|
CeresEngine 0.2.0
A game development framework
|
A event listener that listens for events. More...
#include <CeresEngine/Entity/EventListener.hpp>
Public Member Functions | |
| void | subscribe (EntityEventManager &eventManager) |
Subscribe the listener to the event in the given eventManager. | |
| void | unsubscribe () |
| Unsubscribes the listener. | |
Protected Member Functions | |
| virtual | ~EntityEventListener ()=default |
Private Member Functions | |
| virtual void | when (Entity &entity, const Event &event)=0 |
A callback called whenever the event Event gets emitted by a entity. | |
Private Attributes | |
| EventConnection | mConnection |
| A vector of all active signal connections. | |
A event listener that listens for events.
| Event | the event to listen for |
|
protectedvirtualdefault |
| void CeresEngine::EntityEventListener< Event >::subscribe | ( | EntityEventManager & | eventManager | ) |
Subscribe the listener to the event in the given eventManager.
| eventManager | The event manager to subscribe on |
| void CeresEngine::EntityEventListener< Event >::unsubscribe | ( | ) |
Unsubscribes the listener.
|
privatepure virtual |
A callback called whenever the event Event gets emitted by a entity.
| entity | The entity that emitted the event |
| event | The emitted event object |
|
private |
A vector of all active signal connections.