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

Method Add

common/mouse.go:159–161  ·  view source on GitHub ↗

Add adds a new entity to the MouseSystem. * RenderComponent is only required if you're using the HUDShader on this Entity. * SpaceComponent is required whenever you want to know specific mouse-events on this Entity (like hover, click, etc.). If you don't need those, then you can omit the SpaceCompon

(basic *ecs.BasicEntity, mouse *MouseComponent, space *SpaceComponent, render *RenderComponent)

Source from the content-addressed store, hash-verified

157// * MouseComponent is always required.
158// * BasicEntity is always required.
159func (m *MouseSystem) Add(basic *ecs.BasicEntity, mouse *MouseComponent, space *SpaceComponent, render *RenderComponent) {
160 m.entities = append(m.entities, mouseEntity{basic, mouse, space, render})
161}
162
163// AddByInterface adds the Entity to the system as long as it satisfies, Mouseable. Any Entity containing a BasicEntity,MouseComponent, and RenderComponent, automatically does this.
164func (m *MouseSystem) AddByInterface(i ecs.Identifier) {

Callers 1

AddByInterfaceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected