![]() |
Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
|
The scene manager is responsible for handling the transfer of the current state pointer that refers to the overwritten state class for each instance of the game. More...
#include <sceneManager.h>
Public Member Functions | |
void | addScene (std::string const &sceneName, GameScene *newScene) |
Adds a GameScene into the SceneManager scene buffer. More... | |
rune::GameScene * | getCurrentScene (void) |
Get the currently active GameScene. More... | |
void | setScene (std::string const &newState) |
Set the currently active GameScene. More... | |
int | getNumScenes (void) |
Get the total number of scenes currently stored in the SceneManger scene buffer. More... | |
The scene manager is responsible for handling the transfer of the current state pointer that refers to the overwritten state class for each instance of the game.
void rune::SceneManager::addScene | ( | std::string const & | sceneName, |
GameScene * | newScene | ||
) |
Adds a GameScene into the SceneManager scene buffer.
sceneName | A string that is used to refer back to the scene. |
newScene | New GameScene to be added into the SceneManager scene buffer. |
rune::GameScene * rune::SceneManager::getCurrentScene | ( | void | ) |
int rune::SceneManager::getNumScenes | ( | void | ) |
Get the total number of scenes currently stored in the SceneManger scene buffer.
void rune::SceneManager::setScene | ( | std::string const & | newScene | ) |
Set the currently active GameScene.
newScene | Index in the scene buffer that determines what scene should be set as |