3#include "../Entity/entity.h"
27 void runStageUpdate(std::shared_ptr<GameWorld> gameWorld,
float deltaTime,
float time);
36 void runStageFixedUpdate(std::shared_ptr<GameWorld> gameWorld,
float deltaTime,
float time);
61 template <
typename Event,
typename ...DataType>
62 void broadcastEvent(Event event, std::shared_ptr<GameWorld> gameWorld, DataType... args) {
77 template <
typename Event,
typename ...DataType>
78 void deliverEvent(Event event, Entity entity, std::shared_ptr<GameWorld> gameWorld, DataType... args) {
80 eventSystemsMap[(int) event].invoke(entity, gameWorld, entity, args...);
90 void keyEvent(std::shared_ptr<GameWorld> gameWorld,
int key,
int action);
99 void mousePosEvent(std::shared_ptr<GameWorld> gameWorld,
double xpos,
double ypos);
108 void mouseButtonEvent(std::shared_ptr<GameWorld> gameWorld,
int button,
int action);
116 void scrollEvent(std::shared_ptr<GameWorld> gameWorld,
double distance);
125 void windowResizeEvent(std::shared_ptr<GameWorld> gameWorld,
int width,
int height);
A SystemManager where stages and events can be invoked.
Definition: invokableSystemManager.h:12
void broadcastEvent(Event event, std::shared_ptr< GameWorld > gameWorld, DataType... args)
Broadcast an event. Only systems registered that are not tied to a specific entity will receive this ...
Definition: invokableSystemManager.h:62
void runStageCleanup(std::shared_ptr< GameWorld > gameWorld)
Invoke the Cleanup stage.
Definition: invokableSystemManager.cpp:23
void mouseButtonEvent(std::shared_ptr< GameWorld > gameWorld, int button, int action)
Broadcast a mouse button event.
Definition: invokableSystemManager.cpp:32
void runStageDraw(std::shared_ptr< GameWorld > gameWorld)
Invoke the Draw stage.
Definition: invokableSystemManager.cpp:20
void windowResizeEvent(std::shared_ptr< GameWorld > gameWorld, int width, int height)
Broadcast a window resize event.
Definition: invokableSystemManager.cpp:38
void scrollEvent(std::shared_ptr< GameWorld > gameWorld, double distance)
Broadcast a scroll event.
Definition: invokableSystemManager.cpp:35
void runStageFixedUpdate(std::shared_ptr< GameWorld > gameWorld, float deltaTime, float time)
Invoke the fixed update stage. This calls any FixUpdate, and LateFixedUpdate systems in that order.
Definition: invokableSystemManager.cpp:16
void mousePosEvent(std::shared_ptr< GameWorld > gameWorld, double xpos, double ypos)
Broadcast a mouse position event.
Definition: invokableSystemManager.cpp:29
void deliverEvent(Event event, Entity entity, std::shared_ptr< GameWorld > gameWorld, DataType... args)
Deliver an event to an entity. Any system attached to that entity with this event will receive this d...
Definition: invokableSystemManager.h:78
void runStageStartup(std::shared_ptr< GameWorld > gameWorld)
Invoke the startup stage. This calls all systems attached in the Awake and Start stages.
Definition: invokableSystemManager.cpp:6
void keyEvent(std::shared_ptr< GameWorld > gameWorld, int key, int action)
Broadcast a key event.
Definition: invokableSystemManager.cpp:26
void runStageUpdate(std::shared_ptr< GameWorld > gameWorld, float deltaTime, float time)
Invoke the update stage. This calls any PreUpdate, Update, and LateUpdate systems in that order.
Definition: invokableSystemManager.cpp:11
Manages Systems in the ECS model. Allows for System to be added, but not invoked.
Definition: systemManager.h:17
std::unordered_map< int, EventMap > eventSystemsMap
Maps entity to an EventMap that maps Event to System.
Definition: systemManager.h:207