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

Method Add

common/animation.go:113–118  ·  view source on GitHub ↗

Add starts tracking the given entity.

(basic *ecs.BasicEntity, anim *AnimationComponent, render *RenderComponent)

Source from the content-addressed store, hash-verified

111
112// Add starts tracking the given entity.
113func (a *AnimationSystem) Add(basic *ecs.BasicEntity, anim *AnimationComponent, render *RenderComponent) {
114 if a.entities == nil {
115 a.entities = make(map[uint64]animationEntity)
116 }
117 a.entities[basic.ID()] = animationEntity{anim, render}
118}
119
120// AddByInterface Allows an Entity to be added directly using the Animtionable interface. which every entity containing the BasicEntity,AnimationComponent,and RenderComponent anonymously, automatically satisfies.
121func (a *AnimationSystem) AddByInterface(i ecs.Identifier) {

Callers 1

AddByInterfaceMethod · 0.95

Calls 1

IDMethod · 0.80

Tested by

no test coverage detected