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

Method Remove

common/mouse.go:170–181  ·  view source on GitHub ↗

Remove removes an entity from the MouseSystem.

(basic ecs.BasicEntity)

Source from the content-addressed store, hash-verified

168
169// Remove removes an entity from the MouseSystem.
170func (m *MouseSystem) Remove(basic ecs.BasicEntity) {
171 var delete = -1
172 for index, entity := range m.entities {
173 if entity.ID() == basic.ID() {
174 delete = index
175 break
176 }
177 }
178 if delete >= 0 {
179 m.entities = append(m.entities[:delete], m.entities[delete+1:]...)
180 }
181}
182
183// Update updates all the entities in the MouseSystem.
184func (m *MouseSystem) Update(dt float32) {

Callers 1

SetupMethod · 0.95

Calls 1

IDMethod · 0.80

Tested by 1

SetupMethod · 0.76