![]() |
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 | setNetworkClass (const std::shared_ptr< GUI::Network::ThreadCapsule > &network) |
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 (const std::vector< GUI::Network::MessageNode > &packets) |
Updates the game state for the current frame. | |
void | tick_all () |
Ticks all entities. | |
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 49 of file Orchestrator.hpp.
GUI::ECS::Online::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::Online::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 366 of file Orchestrator.cpp.
void GUI::ECS::Online::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::Online::Orchestrator::isGameOver | ( | ) | const |
Checks if the game is over.
Definition at line 355 of file Orchestrator.cpp.
const bool GUI::ECS::Online::Orchestrator::isGameWon | ( | ) | const |
Checks if the game has been won.
Definition at line 360 of file Orchestrator.cpp.
void GUI::ECS::Online::Orchestrator::render | ( | ) |
Renders the game entities to the window.
Definition at line 285 of file Orchestrator.cpp.
void GUI::ECS::Online::Orchestrator::reset | ( | ) |
Resets the game state, clearing all entities and resetting conditions.
Definition at line 156 of file Orchestrator.cpp.
void GUI::ECS::Online::Orchestrator::setNetworkClass | ( | const std::shared_ptr< GUI::Network::ThreadCapsule > & | network | ) |
Definition at line 132 of file Orchestrator.cpp.
void GUI::ECS::Online::Orchestrator::start | ( | ) |
Starts the game logic and sets the game to a playing state.
Definition at line 140 of file Orchestrator.cpp.
void GUI::ECS::Online::Orchestrator::stop | ( | ) |
Stops the game logic and resets the playing state.
Definition at line 148 of file Orchestrator.cpp.
void GUI::ECS::Online::Orchestrator::tick | ( | const std::vector< GUI::Network::MessageNode > & | packets | ) |
Updates the game state for the current frame.
Definition at line 166 of file Orchestrator.cpp.
void GUI::ECS::Online::Orchestrator::tick_all | ( | ) |
Ticks all entities.
Definition at line 269 of file Orchestrator.cpp.