|
CeresEngine 0.2.0
A game development framework
|
A system is a special kind of service that is managed internally by the SystemManager.
More...
A system is a special kind of service that is managed internally by the SystemManager.
Every system will have it's update() method called periodically this gives the system a chance to run it`s simulation and update any entity internal state to match the simulation.
Systems can also be used to track and connect engine sub-systems with CeresEngine entities.
There are a series of virtual methods that can be implemented by a system as a response of certain events and states in the entity system.
add() and remove() will be called for every EntityObject specified in EntityObjects list. This will be called by the manager every time a new entity matches the criteria to be called casted as the given EntityObject. If any required component is removed or the entity is destroyed, remove() will be called to notify the system of that.canAct() and act() will be called for every Action specified in Actions. This allows the system to control if it can respond to a given action message.| T | The system implementation type. |
| EntityObjects | The entity object types the system wants to be made aware. These will create pure-virtual methods add and remove as per the definition from SystemComponentListener. |
| Components | The set of components used by the system. The implementation might use this data to optimize and parallelize system updating. |
| Actions | The set of actions that the system wants to be able to handle. This will add the interface of EntityActionHandler to the system. |