Add adds an entity to the CollisionSystem. To be added, the entity has to have a basic, collision, and space component.
(basic *ecs.BasicEntity, collision *CollisionComponent, space *SpaceComponent)
| 530 | |
| 531 | // Add adds an entity to the CollisionSystem. To be added, the entity has to have a basic, collision, and space component. |
| 532 | func (c *CollisionSystem) Add(basic *ecs.BasicEntity, collision *CollisionComponent, space *SpaceComponent) { |
| 533 | c.entities = append(c.entities, collisionEntity{basic, collision, space}) |
| 534 | } |
| 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) { |