Singleton manager for running the active scenes and swapping scenes out.
More...
#include <SceneManager.hpp>
|
void | AddScene (std::string sceneName, pybind11::module_ sceneScript) |
|
void | ChangeActiveScene (std::string sceneName) |
|
void | RunActiveScene (float dt) |
|
void | EndGame () |
| Callable from scripts to signal that the game should be terminated.
|
|
bool | GameEnded () |
| Callable from C++ to check if the game should be terminated.
|
|
Singleton manager for running the active scenes and swapping scenes out.
◆ AddScene()
void SceneManager::AddScene |
( |
std::string | sceneName, |
|
|
pybind11::module_ | sceneScript ) |
Adds a scene to the game under a given key
- Parameters
-
sceneName | The key by which the scene can be accessed |
sceneScript | The python module which contains the logic for the scene |
◆ ChangeActiveScene()
void SceneManager::ChangeActiveScene |
( |
std::string | sceneName | ) |
|
Changes the active scene, shutting down the previous one and starting up the new one
- Parameters
-
sceneName | The name of the scene to switch to |
◆ RunActiveScene()
void SceneManager::RunActiveScene |
( |
float | dt | ) |
|
Runs the Input
, Update
, and Draw
methods on the active scene
- Parameters
-
dt | The delta time used for the Update method |
The documentation for this struct was generated from the following files: