A event listener that listens for events.
Definition EventListener.hpp:22
void subscribe(EntityEventManager &eventManager)
Subscribe the listener to the event in the given eventManager.
Definition EventListener.hpp:53
virtual ~EntityEventListener()=default
EventConnection mConnection
A vector of all active signal connections.
Definition EventListener.hpp:27
virtual void when(Entity &entity, const Event &event)=0
A callback called whenever the event Event gets emitted by a entity.
void unsubscribe()
Unsubscribes the listener.
Definition EventListener.hpp:57
Definition EventManager.hpp:24
The base entity class.
Definition Entity.hpp:41
Scoped connection class.
Definition Event.hpp:104
Base template for the event class.
Definition Event.hpp:27
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25