Manages the current scene and handles scene transitions. More...
#include <SceneManager.h>
Static Public Member Functions | |
static Scene * | GetCurrentScene () |
Gets the current scene. | |
static void | SetNextScene (Scene *scene) |
Sets the next scene to transition to. | |
static Camera * | GetCurrentCamera () |
Gets the current camera. | |
static void | SetCurrentCamera (Camera *cam) |
Sets the current camera. | |
static Camera * | GetCurrentCamera2D () |
Gets the current 2D camera. | |
static void | SetCurrentCamera2D (Camera *cam) |
Sets the current 2D camera. | |
static Terrain * | GetTerrain () |
Sets the terrain for the current scene. | |
Private Member Functions | |
SceneManager (const SceneManager &)=delete | |
SceneManager & | operator= (const SceneManager &)=delete |
void | privInitializeScene () |
void | privDraw () |
void | privUpdate () |
void | privEndScene () |
Static Private Member Functions | |
static SceneManager & | Instance () |
static void | Delete () |
Deletes the SceneManager instance. | |
static void | InitializeScene () |
Initializes the current scene. | |
static void | UpdateScene () |
Updates the current scene. | |
static void | DrawScene () |
Draws the current scene. | |
static void | EndScene () |
Ends the current scene. | |
static void | SetCurrentScene (Scene *scene) |
Sets the current scene. | |
static void | ChangeScene (Scene *scene) |
Changes the current scene to the specified scene. | |
Private Attributes | |
Scene * | CurrentScene |
Pointer to the current scene. | |
Scene * | DefaultScene |
Pointer to the default scene. | |
Scene * | PrevScene |
Pointer to the previous scene during scene transitions. | |
SceneChangeStrategy * | pSceneChangeStrategy |
Pointer to the scene change strategy. | |
Static Private Attributes | |
static SceneManager * | ptrInstance = nullptr |
Friends | |
class | SceneAttorney |
Manages the current scene and handles scene transitions.
The SceneManager class is responsible for managing the current scene and handling scene transitions. It provides methods to set, get, and change the current scene, as well as to initialize, update, draw, and end the scene. It follows the Singleton design pattern.
|
staticprivate |
Changes the current scene to the specified scene.
scene | Pointer to the scene to change to. |
|
static |
Gets the current camera.
|
static |
Gets the current 2D camera.
|
static |
Gets the current scene.
|
static |
Sets the terrain for the current scene.
t | Pointer to the terrain to set. |
|
static |
Sets the current camera.
cam | Pointer to the camera to set as current. |
|
static |
Sets the current 2D camera.
cam | Pointer to the 2D camera to set as current. |
|
inlinestaticprivate |
Sets the current scene.
scene | Pointer to the scene to set as current. |
|
static |
Sets the next scene to transition to.
scene | Pointer to the next scene. |