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

Method Remove

common/render.go:323–330  ·  view source on GitHub ↗

Remove removes an entity from the RenderSystem

(basic ecs.BasicEntity)

Source from the content-addressed store, hash-verified

321
322// Remove removes an entity from the RenderSystem
323func (rs *RenderSystem) Remove(basic ecs.BasicEntity) {
324 var d = rs.EntityExists(&basic)
325 if d >= 0 {
326 rs.entities = append(rs.entities[:d], rs.entities[d+1:]...)
327 rs.sortingNeeded = true
328 }
329 delete(rs.ids, basic.ID())
330}
331
332// Update draws the entities in the RenderSystem to the OpenGL Surface.
333func (rs *RenderSystem) Update(dt float32) {

Callers 1

SetupMethod · 0.95

Calls 2

EntityExistsMethod · 0.95
IDMethod · 0.80

Tested by 1

SetupMethod · 0.76