|
CeresEngine 0.2.0
A game development framework
|
The ComponentListener is a EntityManager listener type that gets notified whenever an entity matching a given mask() gets added or removed in the entity manager.
More...
#include <CeresEngine/Entity/Component.hpp>
Public Member Functions | |
| ComponentMask | mask () const noexcept final |
| The component criteria a entity must match for consideration of a callback. | |
Public Member Functions inherited from CeresEngine::AbstractComponentListener | |
| virtual | ~AbstractComponentListener ()=default |
Destroys the AbstractComponentListener instance. | |
| virtual void | componentsAdded (const Entity &entity) noexcept=0 |
A notification dispatched by the SystemManager to a system. | |
| virtual void | componentsRemoved (const Entity &entity) noexcept=0 |
A notification dispatched by the SystemManager to a system. | |
| virtual void | entityDirtied (const Entity &entity, const EntityChangeSet &changeSet) noexcept |
A notification dispatched by the SystemManager to a system. | |
The ComponentListener is a EntityManager listener type that gets notified whenever an entity matching a given mask() gets added or removed in the entity manager.
The mask method is final overriden with the automatically generated mask of all components Cs as if ComponentSet<Cs...>::mask.
The componentsAdded notification is dispatched once a new entity matching the mask criteria is created (either by creating it or by adding all components required).
The componentsRemoved notification is dispatched once an entity that previously matched the mask criteria is destroyed (either by destroying it or by removing one of the required components).
| Cs | the component types to listen for |
|
inlinefinalvirtualnoexcept |
The component criteria a entity must match for consideration of a callback.
Implements CeresEngine::AbstractComponentListener.