Add starts tracking the given entity.
(basic *ecs.BasicEntity, anim *AnimationComponent, render *RenderComponent)
| 111 | |
| 112 | // Add starts tracking the given entity. |
| 113 | func (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. |
| 121 | func (a *AnimationSystem) AddByInterface(i ecs.Identifier) { |