|
Engine
Raylib based game framework
|
Manages scenes and the the execution of the current scene. More...
#include <SceneManager.h>
Public Member Functions | |
| void | Update (const float deltaT) |
| Updates current scene. | |
| void | Draw () |
| Renders the current scene. | |
| template<typename T , typename... Args> requires std::is_base_of_v<Scene, T> | |
| void | AddScene (Args &&... args) |
| Adds a scene to the manager. | |
| template<typename T > requires std::is_base_of_v<Scene, T> | |
| void | RemoveScene () |
| Removes a scene from the manager. | |
| template<typename T > requires std::is_base_of_v<Scene, T> | |
| void | ChangeScene () |
| Queues a scene change at the end of the frame. | |
| void | ClearScenes () |
| Removes all scenes. | |
Manages scenes and the the execution of the current scene.
Only one scene can be active at the time. Scenes update and render after systems.
|
inline |
Adds a scene to the manager.
The scene is constructed in within the manager and owned by it. Scenes must derive from the Scene base class.
| T | Scene type |
| Args | Constructor arguments types |
| args | Scene constructor arguments |
Usage:
|
inline |
Queues a scene change at the end of the frame.
OnExit of the current scene will be called. OnEnter of the next scene will be called.
| Scene | type |
|
inline |
Removes a scene from the manager.
| Scene | type |
| void SceneManager::Update | ( | const float | deltaT | ) |
Updates current scene.
| deltaT | Duration of previous frame |