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

Method Remove

common/audio.go:147–158  ·  view source on GitHub ↗

Remove removes an entity from the AudioSystem

(basic ecs.BasicEntity)

Source from the content-addressed store, hash-verified

145
146// Remove removes an entity from the AudioSystem
147func (a *AudioSystem) Remove(basic ecs.BasicEntity) {
148 delete := -1
149 for index, e := range a.entities {
150 if e.BasicEntity.ID() == basic.ID() {
151 delete = index
152 break
153 }
154 }
155 if delete >= 0 {
156 a.entities = append(a.entities[:delete], a.entities[delete+1:]...)
157 }
158}
159
160// Update doesn't do anything since audio is run on it's own thread
161func (a *AudioSystem) Update(dt float32) {

Callers 1

SetupMethod · 0.95

Calls 1

IDMethod · 0.80

Tested by 1

SetupMethod · 0.76