Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
rune::SceneManager Class Reference

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::GameScenegetCurrentScene (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...
 

Detailed Description

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.

Author
Thomas Montano
Date
March 2 2020

Member Function Documentation

◆ addScene()

void rune::SceneManager::addScene ( std::string const &  sceneName,
GameScene newScene 
)

Adds a GameScene into the SceneManager scene buffer.

Parameters
sceneNameA string that is used to refer back to the scene.
newSceneNew GameScene to be added into the SceneManager scene buffer.

◆ getCurrentScene()

rune::GameScene * rune::SceneManager::getCurrentScene ( void  )

Get the currently active GameScene.

Returns
A pointer to the currently active GameScene

◆ getNumScenes()

int rune::SceneManager::getNumScenes ( void  )

Get the total number of scenes currently stored in the SceneManger scene buffer.

Returns
The total number of scenes currently stored in the SceneManager scene buffer.

◆ setScene()

void rune::SceneManager::setScene ( std::string const &  newScene)

Set the currently active GameScene.

Parameters
newSceneIndex in the scene buffer that determines what scene should be set as

The documentation for this class was generated from the following files: