 |
Blamite Game Engine - blam!
00272.10.26.20.0001.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
41 std::vector<EventType> subscribed_events;
53 subscribed_events.push_back(type);
68 return subscribed_events;
80 for (
int i = 0; i < subscribed_events.size(); i++)
82 if (subscribed_events.at(i) == type)
100 priority = new_priority;
EventType
Definition: events.h:5
int GetPriority()
Retrieves the priority of the listener.
Definition: events.h:110
BLAM void RegisterListener(EventListener *listener)
Registers a an event listener.
Definition: events.cpp:62
virtual void onCharacterInputEvent(Blam::Events::CharacterInputEvent *event)
Called when the listener is subscribed to Character Input events, and a new CharacterInputEvent is fi...
Definition: events.h:121
@ Tick
Definition: events.h:9
void Subscribe(EventType type)
Subscribes to an event type.
Definition: events.h:51
Class representing an engine tick event.
Definition: TickEvent.hpp:12
BLAM void FireEvent(Event *event)
Fires an event.
Definition: events.cpp:46
BLAM void UnregisterListener(EventListener *listener)
Unregisters a an event listener.
Definition: events.cpp:67
Namespace for handling things related to Events.
Definition: CharacterInputEvent.hpp:5
~EventListener()
Definition: events.h:56
virtual void onTickEvent(Blam::Events::TickEvent *event)
Called when the listener is subscribed to Key Press events, and a new TickEvent is fired.
Definition: events.h:137
bool isSubscribed(EventType type)
Determines whether or not the listener is subscribed to the specified event type.
Definition: events.h:78
@ CharacterInput
Definition: events.h:8
#define BLAM
Definition: discord_rpc.h:8
@ KeyPress
Definition: events.h:7
virtual void onKeyPressEvent(Blam::Events::KeyPressEvent *event)
Called when the listener is subscribed to Key Press events, and a new KeyPressEvent is fired.
Definition: events.h:129
void SetPriority(int new_priority)
Sets the priority of the listener.
Definition: events.h:98
Class representing a virtual key press.
Definition: KeyPressEvent.hpp:14
BLAM void ResortListeners(EventListener *requesting_listener)
Re-sorts the list of registered listeners after a priority modification.
Definition: events.cpp:93
std::vector< EventType > getSubscribedEvents()
Retrieves the list of subscribed event types.
Definition: events.h:66
Class representing an Event Listener.
Definition: events.h:38