Slippers Engine
 
Loading...
Searching...
No Matches
SceneManager Class Reference

Singleton responsible for getting scenes and scene swapping. More...

#include <SceneManager.h>

Collaboration diagram for SceneManager:
Collaboration graph

Static Public Member Functions

static SceneGetCurrScene ()
 Returns pointer to current scene.
 
static void SetStartScene (Scene *start)
 Sets pointer to start scene.
 
static void SetNextScene (Scene *next)
 Changes to new Scene.
 

Detailed Description

Singleton responsible for getting scenes and scene swapping.

Member Function Documentation

◆ GetCurrScene()

static Scene * SceneManager::GetCurrScene ( )
static

Returns pointer to current scene.

Returns
Scene*

◆ SetNextScene()

static void SceneManager::SetNextScene ( Scene * next)
static

Changes to new Scene.

Called when wanting to change to a new scene. When called, this function will call SceneEnd on the current scene and call Initialize on the new scene.

Warning
This function will give an error if called twice on the same frame.
SceneManager::SetNextScene(new SceneDemoTwo());
static void SetNextScene(Scene *next)
Changes to new Scene.
Definition SceneManager.h:77
Parameters
next

◆ SetStartScene()

static void SceneManager::SetStartScene ( Scene * start)
static

Sets pointer to start scene.

Sets the starting scene to be a specified scene. This will normally be done in Game::LoadResources. If a start scene is not set in Game::LoadResources, then a blank scene will be created with the Game::SetClear being the main color.

SceneManager::SetStartScene(new SceneDemo());
static void SetStartScene(Scene *start)
Sets pointer to start scene.
Definition SceneManager.h:64
Parameters
start