R-Type  2
Doom but in better
Loading...
Searching...
No Matches
GUI::ECS::Demo::Orchestrator Class Reference

The Orchestrator class manages the overall game state, including entity creation, updates, and rendering. More...

#include <Orchestrator.hpp>

Inheritance diagram for GUI::ECS::Demo::Orchestrator:
Inheritance graph
Collaboration diagram for GUI::ECS::Demo::Orchestrator:
Collaboration graph

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.
 
- Public Member Functions inherited from GUI::ECS::EntityNode
 EntityNode (const size_t entityId=0)
 
virtual ~EntityNode ()=default
 
virtual size_t getEntityNodeId () const
 

Additional Inherited Members

- Protected Attributes inherited from GUI::ECS::EntityNode
size_t _entityID
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Orchestrator()

GUI::ECS::Demo::Orchestrator::Orchestrator ( const std::uint32_t entityId = 0)

Default constructor.

Parameters
entityIdThe unique ID of the entity. Default is 0.

Definition at line 16 of file Orchestrator.cpp.

◆ ~Orchestrator()

GUI::ECS::Demo::Orchestrator::~Orchestrator ( )
default

Destructor.

Member Function Documentation

◆ getInfo()

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.

Parameters
indentThe level to which the class should be indented in the dump.
Returns
const std::string The formatted output.

Definition at line 412 of file Orchestrator.cpp.

◆ initialiseClass()

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.

Parameters
ecsEntitiesA map of type-indexed vectors containing entity data.

Definition at line 21 of file Orchestrator.cpp.

◆ isGameOver()

const bool GUI::ECS::Demo::Orchestrator::isGameOver ( ) const

Checks if the game is over.

Returns
True if the game is over, false otherwise.

Definition at line 401 of file Orchestrator.cpp.

◆ isGameWon()

const bool GUI::ECS::Demo::Orchestrator::isGameWon ( ) const

Checks if the game has been won.

Returns
True if the game is won, false otherwise.

Definition at line 406 of file Orchestrator.cpp.

◆ render()

void GUI::ECS::Demo::Orchestrator::render ( )

Renders the game entities to the window.

Definition at line 347 of file Orchestrator.cpp.

◆ reset()

void GUI::ECS::Demo::Orchestrator::reset ( )

Resets the game state, clearing all entities and resetting conditions.

Definition at line 188 of file Orchestrator.cpp.

◆ start()

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.

◆ stop()

void GUI::ECS::Demo::Orchestrator::stop ( )

Stops the game logic and resets the playing state.

Definition at line 180 of file Orchestrator.cpp.

◆ tick()

void GUI::ECS::Demo::Orchestrator::tick ( )

Updates the game state for the current frame.

Definition at line 198 of file Orchestrator.cpp.


The documentation for this class was generated from the following files: