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

Method AddByInterface

common/render.go:317–320  ·  view source on GitHub ↗

AddByInterface adds any Renderable to the render system. Any Entity containing a BasicEntity,RenderComponent, and SpaceComponent anonymously does this automatically

(i ecs.Identifier)

Source from the content-addressed store, hash-verified

315
316// AddByInterface adds any Renderable to the render system. Any Entity containing a BasicEntity,RenderComponent, and SpaceComponent anonymously does this automatically
317func (rs *RenderSystem) AddByInterface(i ecs.Identifier) {
318 o, _ := i.(Renderable)
319 rs.Add(o.GetBasicEntity(), o.GetRenderComponent(), o.GetSpaceComponent())
320}
321
322// Remove removes an entity from the RenderSystem
323func (rs *RenderSystem) Remove(basic ecs.BasicEntity) {

Callers

nothing calls this directly

Calls 4

AddMethod · 0.95
GetBasicEntityMethod · 0.80
GetRenderComponentMethod · 0.65
GetSpaceComponentMethod · 0.65

Tested by

no test coverage detected