![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Represents a scene in a game. More...
#include <Scene.hpp>
Public Member Functions | |
Scene (const std::string &name) noexcept | |
Name constructor. | |
virtual | ~Scene () |
Destructor. | |
void | on_push () override |
When scene is pushed to the stack. | |
void | on_pop () override |
When scene is popped from the stack. | |
void | update (Registry ®istry) |
Process events and updates. | |
void | render () |
Render scene. | |
void | clear () |
Remove all scene data. | |
void | add_system (const std::string &system) |
Add a system to operate on entities in this scene. | |
![]() | |
State (State &&)=default | |
Move constructor. | |
State & | operator= (State &&)=default |
Move assignment operator. | |
State (const State &)=default | |
Copy constructor. | |
State & | operator= (const State &)=default |
Copy assignment operator. | |
virtual | ~State ()=default |
Virtual destructor. | |
const std::string & | name () const noexcept |
Get state name. | |
Private Member Functions | |
Scene ()=delete | |
Constructor. | |
Scene (const Scene &)=delete | |
Copy constructor. | |
Scene & | operator= (const Scene &)=delete |
Copy assignment operator. | |
Private Attributes | |
SystemStack | m_systems |
List of systems to process. | |
Additional Inherited Members | |
![]() | |
State (const std::string &name) noexcept | |
Name constructor. | |
![]() | |
std::string | m_name |
Name for debug purposes. | |
Represents a scene in a game.
Scenes should be logically grouped -> i.e. a map, player data + ui, battle, menu, etc. Each scene is an independant collection of systems, but not entities.
|
noexcept |
|
virtual |
|
privatedelete |
Constructor.
|
privatedelete |
Copy constructor.
|
overridevirtual |
When scene is pushed to the stack.
Implements galaxy::State.
Definition at line 36 of file Scene.cpp.
|
overridevirtual |
When scene is popped from the stack.
Implements galaxy::State.
Definition at line 40 of file Scene.cpp.
void galaxy::Scene::update | ( | Registry & | registry | ) |
void galaxy::Scene::clear | ( | ) |
void galaxy::Scene::add_system | ( | const std::string & | system | ) |
|
private |