AddByInterface Provides a simple way to add an entity to the system that satisfies Collisionable. Any entity containing, BasicEntity,CollisionComponent, and SpaceComponent anonymously, automatically does this.
(i ecs.Identifier)
| 535 | |
| 536 | // AddByInterface Provides a simple way to add an entity to the system that satisfies Collisionable. Any entity containing, BasicEntity,CollisionComponent, and SpaceComponent anonymously, automatically does this. |
| 537 | func (c *CollisionSystem) AddByInterface(i ecs.Identifier) { |
| 538 | o, _ := i.(Collisionable) |
| 539 | c.Add(o.GetBasicEntity(), o.GetCollisionComponent(), o.GetSpaceComponent()) |
| 540 | } |
| 541 | |
| 542 | // Remove removes an entity from the CollisionSystem. |
| 543 | func (c *CollisionSystem) Remove(basic ecs.BasicEntity) { |
nothing calls this directly
no test coverage detected