![]() |
R-Type
2
Doom but in better
|
The Orchestrator class manages the overall game state, including entity creation, updates, and rendering. More...
#include <Orchestrator.hpp>
Public Member Functions | |
Orchestrator (const std::uint32_t entityId=0) | |
Default constructor. | |
~Orchestrator ()=default | |
Destructor. | |
void | initialiseClass (std::unordered_map< std::type_index, std::vector< std::any > > &ecsEntities) |
Initializes the ECS entities managed by the orchestrator. | |
void | start () |
Starts the game logic and sets the game to a playing state. | |
void | stop () |
Stops the game logic and resets the playing state. | |
void | reset () |
Resets the game state, clearing all entities and resetting conditions. | |
void | tick () |
Updates the game state for the current frame. | |
void | render () |
Renders the game entities to the window. | |
const bool | isGameOver () const |
Checks if the game is over. | |
const bool | isGameWon () const |
Checks if the game has been won. | |
const std::string | getInfo (const unsigned int indent=0) const |
This is a function meant for debugging purposes It will dump the current state of the variables upon call. It will dump them for itself and any of it's underlying classes. | |
![]() | |
EntityNode (const size_t entityId=0) | |
virtual | ~EntityNode ()=default |
virtual size_t | getEntityNodeId () const |
Additional Inherited Members | |
![]() | |
size_t | _entityID |
The Orchestrator class manages the overall game state, including entity creation, updates, and rendering.
This class inherits from EntityNode and coordinates various systems and entities in the ECS architecture. It also handles sound effects, game progression, and scene setup.
Definition at line 47 of file Orchestrator.hpp.
GUI::ECS::Demo::Orchestrator::Orchestrator | ( | const std::uint32_t | entityId = 0 | ) |
Default constructor.
entityId | The unique ID of the entity. Default is 0. |
Definition at line 16 of file Orchestrator.cpp.
|
default |
Destructor.
const std::string GUI::ECS::Demo::Orchestrator::getInfo | ( | const unsigned int | indent = 0 | ) | const |
This is a function meant for debugging purposes It will dump the current state of the variables upon call. It will dump them for itself and any of it's underlying classes.
indent | The level to which the class should be indented in the dump. |
Definition at line 412 of file Orchestrator.cpp.
void GUI::ECS::Demo::Orchestrator::initialiseClass | ( | std::unordered_map< std::type_index, std::vector< std::any > > & | ecsEntities | ) |
Initializes the ECS entities managed by the orchestrator.
ecsEntities | A map of type-indexed vectors containing entity data. |
Definition at line 21 of file Orchestrator.cpp.
const bool GUI::ECS::Demo::Orchestrator::isGameOver | ( | ) | const |
Checks if the game is over.
Definition at line 401 of file Orchestrator.cpp.
const bool GUI::ECS::Demo::Orchestrator::isGameWon | ( | ) | const |
Checks if the game has been won.
Definition at line 406 of file Orchestrator.cpp.
void GUI::ECS::Demo::Orchestrator::render | ( | ) |
Renders the game entities to the window.
Definition at line 347 of file Orchestrator.cpp.
void GUI::ECS::Demo::Orchestrator::reset | ( | ) |
Resets the game state, clearing all entities and resetting conditions.
Definition at line 188 of file Orchestrator.cpp.
void GUI::ECS::Demo::Orchestrator::start | ( | ) |
Starts the game logic and sets the game to a playing state.
Definition at line 172 of file Orchestrator.cpp.
void GUI::ECS::Demo::Orchestrator::stop | ( | ) |
Stops the game logic and resets the playing state.
Definition at line 180 of file Orchestrator.cpp.
void GUI::ECS::Demo::Orchestrator::tick | ( | ) |
Updates the game state for the current frame.
Definition at line 198 of file Orchestrator.cpp.