![]() |
R-Type
2
Doom but in better
|
#include <sstream>
#include "EventSystem.hpp"
#include "SpawnSystem.hpp"
#include "MovementSystem.hpp"
#include "WeaponSystem.hpp"
#include "PlayerMiscellaneous.hpp"
Go to the source code of this file.
Functions | |
void | event_system (Registry &r) |
Processes events from the queue and performs actions. | |
bool | validateAction (const GameMessage &event, Registry &r) |
Validates the action associated with the event. | |
bool | performAction (const GameMessage &event, Registry &r) |
Performs the action associated with the event. | |
void event_system | ( | Registry & | r | ) |
Processes events from the queue and performs actions.
This function continuously checks the event queue in the provided Registry
instance and processes the events one by one. Each event is validated and, if valid, an action is performed based on the event type.
r | Reference to the Registry instance where the event queue is located. |
Definition at line 8 of file EventSystem.cpp.
bool performAction | ( | const GameMessage & | event, |
Registry & | r ) |
Performs the action associated with the event.
This function performs the appropriate action based on the event type.
event | The GameMessage event that dictates the action. |
r | Reference to the Registry instance. |
true
if the action was successfully performed, otherwise false
. Definition at line 35 of file EventSystem.cpp.
bool validateAction | ( | const GameMessage & | event, |
Registry & | r ) |
Validates the action associated with the event.
This function checks whether the action in the given event is valid.
event | The GameMessage event to be validated. |
r | Reference to the Registry instance. |
true
if the action is valid, otherwise false
. Definition at line 30 of file EventSystem.cpp.