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

Method Remove

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

Source from the content-addressed store, hash-verified

255}
256
257func (b *BounceSystem) Remove(basic ecs.BasicEntity) {
258 delete := -1
259 for index, e := range b.entities {
260 if e.BasicEntity.ID() == basic.ID() {
261 delete = index
262 break
263 }
264 }
265 if delete >= 0 {
266 b.entities = append(b.entities[:delete], b.entities[delete+1:]...)
267 }
268}
269
270func (b *BounceSystem) Update(dt float32) {
271 for _, e := range b.entities {

Callers

nothing calls this directly

Calls 1

IDMethod · 0.80

Tested by

no test coverage detected