libes
0.5.3
an Entity System library for C++
|
A single system. More...
#include <es/SingleSystem.h>
Public Member Functions | |
SingleSystem (int priority, std::set< ComponentType > needed, Manager *manager) | |
Create a single system. More... | |
virtual bool | addEntity (Entity e) override |
Add an entity in the system. More... | |
virtual bool | removeEntity (Entity e) override |
Removes an entity from the system. More... | |
Public Member Functions inherited from es::System | |
System (int priority, std::set< ComponentType > needed, Manager *manager) | |
A system constructor. More... | |
virtual | ~System () |
int | getPriority () const |
Get the priority of the system. More... | |
std::set< ComponentType > | getNeededComponents () const |
Get the needed component types. More... | |
Manager * | getManager () |
Get the manager. More... | |
virtual void | init () |
Initialize the system. More... | |
virtual void | preUpdate (float delta) |
Do something before the individual update of each entity. More... | |
virtual void | postUpdate (float delta) |
Do something after the individual update of each entity. More... | |
virtual void | update (float delta) |
Update all the entities in the current time step. More... | |
A single system.
A single system is a System that handle a single entity.
|
inline |
Create a single system.
priority | the priority of the system (small priority will be executed first) |
needed | the set of needed component types that an entity must have to be handled properly by this system |
manager | the manager (that is saved in the system so that the system can easily access the manager) |
|
overridevirtual |
Add an entity in the system.
The entity must have the needed components (this is not verified by the library). The order in which the entity are added is not saved.
e | the entity |
Implements es::System.
|
overridevirtual |
Removes an entity from the system.
e | the entity |
Implements es::System.