MCPcopy Create free account
hub / github.com/EngoEngine/ecs / Remove

Method Remove

system_test.go:83–94  ·  view source on GitHub ↗
(basic BasicEntity)

Source from the content-addressed store, hash-verified

81}
82
83func (s *SystemAddRemove) Remove(basic BasicEntity) {
84 delete := -1
85 for index, e := range s.entities {
86 if e.BasicEntity.ID() == basic.ID() {
87 delete = index
88 break
89 }
90 }
91 if delete >= 0 {
92 s.entities = append(s.entities[:delete], s.entities[delete+1:]...)
93 }
94}
95
96func (s *SystemAddRemove) Update(dt float32) {}
97

Callers

nothing calls this directly

Calls 1

IDMethod · 0.65

Tested by

no test coverage detected