本文整理匯總了Golang中engo/io/ecs.BasicEntity類的典型用法代碼示例。如果您正苦於以下問題:Golang BasicEntity類的具體用法?Golang BasicEntity怎麽用?Golang BasicEntity使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了BasicEntity類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Remove
func (a *AnimationSystem) Remove(basic ecs.BasicEntity) {
delete := -1
for index, e := range a.entities {
if e.BasicEntity.ID() == basic.ID() {
delete = index
break
}
}
if delete >= 0 {
a.entities = append(a.entities[:delete], a.entities[delete+1:]...)
}
}
示例2: Remove
func (s *ScaleSystem) Remove(basic ecs.BasicEntity) {
delete := -1
for index, e := range s.entities {
if e.BasicEntity.ID() == basic.ID() {
delete = index
break
}
}
if delete >= 0 {
s.entities = append(s.entities[:delete], s.entities[delete+1:]...)
}
}
示例3: Remove
func (c *CollisionSystem) Remove(basic ecs.BasicEntity) {
delete := -1
for index, e := range c.entities {
if e.BasicEntity.ID() == basic.ID() {
delete = index
break
}
}
if delete >= 0 {
c.entities = append(c.entities[:delete], c.entities[delete+1:]...)
}
}
示例4: Remove
func (b *BounceSystem) Remove(basic ecs.BasicEntity) {
delete := -1
for index, e := range b.entities {
if e.BasicEntity.ID() == basic.ID() {
delete = index
break
}
}
if delete >= 0 {
b.entities = append(b.entities[:delete], b.entities[delete+1:]...)
}
}
示例5: Remove
func (f *FallingSystem) Remove(basic ecs.BasicEntity) {
delete := -1
for index, e := range f.entities {
if e.BasicEntity.ID() == basic.ID() {
delete = index
break
}
}
if delete >= 0 {
f.entities = append(f.entities[:delete], f.entities[delete+1:]...)
}
}
示例6: Remove
func (h *HideSystem) Remove(basic ecs.BasicEntity) {
delete := -1
for index, e := range h.entities {
if e.BasicEntity.ID() == basic.ID() {
delete = index
break
}
}
if delete >= 0 {
h.entities = append(h.entities[:delete], h.entities[delete+1:]...)
}
}
示例7: Remove
func (m *MouseSystem) Remove(basic ecs.BasicEntity) {
var delete int = -1
for index, entity := range m.entities {
if entity.ID() == basic.ID() {
delete = index
break
}
}
if delete >= 0 {
m.entities = append(m.entities[:delete], m.entities[delete+1:]...)
}
}
示例8: Remove
func (rs *RenderSystem) Remove(basic ecs.BasicEntity) {
var delete int = -1
for index, entity := range rs.entities {
if entity.ID() == basic.ID() {
delete = index
break
}
}
if delete >= 0 {
rs.entities = append(rs.entities[:delete], rs.entities[delete+1:]...)
rs.sortingNeeded = true
}
}