Manages the lifecycle of all scenes in the game. More...
#include <SceneManager.h>

Public Member Functions | |
| void | loadScene (std::string id) |
| Loads a scene by its string identifier. | |
| void | loadScene (int buildIndex) |
| Loads a scene by its build index. | |
| void | loadNextScene () |
| Loads the scene with the next sequential build index. | |
| void | loadPrevScene () |
| Loads the scene with the previous sequential build index. | |
| Scene * | getCurrentScene () |
| Gets a pointer to the currently active primary scene. | |
| void | addScene (Scene *scene) |
| Adds a scene to the manager's collection. | |
| void | removeBgScene (int layer) |
| Removes a background (panel) scene from a specific layer. | |
| void | updateScene () |
| Calls the update method on the current active scene(s). | |
| void | callSceneEvents (SDL_Event &event) |
| Forwards SDL events to the current active scene(s). | |
| void | drawScene () |
| Calls the draw method on the current active scene(s). | |
| void | reloadScene () |
| Calls the reload method on the current active scene. | |
Manages the lifecycle of all scenes in the game.
Handles loading, unloading, and routing updates and draw calls to the active scene(s).
Adds a scene to the manager's collection.
| scene | A pointer to the scene to add. |

Forwards SDL events to the current active scene(s).
| event | The SDL_Event to process. |

| Scene * SceneManager::getCurrentScene | ( | ) |
Gets a pointer to the currently active primary scene.
Loads a scene by its build index.
| buildIndex | The index of the scene to load. |

| void SceneManager::loadScene | ( | std::string | id | ) |
Loads a scene by its string identifier.
| id | The name of the scene to load. |


Removes a background (panel) scene from a specific layer.
| layer | The layer from which to remove a scene. |