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

Method AddByInterface

common/animation.go:121–124  ·  view source on GitHub ↗

AddByInterface Allows an Entity to be added directly using the Animtionable interface. which every entity containing the BasicEntity,AnimationComponent,and RenderComponent anonymously, automatically satisfies.

(i ecs.Identifier)

Source from the content-addressed store, hash-verified

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) {
122 o, _ := i.(Animationable)
123 a.Add(o.GetBasicEntity(), o.GetAnimationComponent(), o.GetRenderComponent())
124}
125
126// Remove stops tracking the given entity.
127func (a *AnimationSystem) Remove(basic ecs.BasicEntity) {

Callers

nothing calls this directly

Calls 4

AddMethod · 0.95
GetBasicEntityMethod · 0.80
GetAnimationComponentMethod · 0.65
GetRenderComponentMethod · 0.65

Tested by

no test coverage detected