MCPcopy
hub / github.com/EngoEngine/engo / Remove

Method Remove

demos/pong/pong.go:211–222  ·  view source on GitHub ↗
(basic ecs.BasicEntity)

Source from the content-addressed store, hash-verified

209}
210
211func (s *SpeedSystem) Remove(basic ecs.BasicEntity) {
212 delete := -1
213 for index, e := range s.entities {
214 if e.BasicEntity.ID() == basic.ID() {
215 delete = index
216 break
217 }
218 }
219 if delete >= 0 {
220 s.entities = append(s.entities[:delete], s.entities[delete+1:]...)
221 }
222}
223
224func (s *SpeedSystem) Update(dt float32) {
225 speedMultiplier := float32(100)

Callers

nothing calls this directly

Calls 1

IDMethod · 0.80

Tested by

no test coverage detected