R-Type
Public Member Functions | List of all members
GameEngine::SceneManager Class Reference

Class managing all the scenes for the game. More...

#include <SceneManager.hpp>

Public Member Functions

 SceneManager ()
 Default constructor. More...
 
 ~SceneManager ()=default
 Default destructor. More...
 
void registerScene (const std::string &name, std::unique_ptr< IScene > &&scene)
 Registers a new scene. More...
 
void unregisterScene (const std::string &name)
 Unregisters a scene. More...
 
void loadScene (const std::string &name)
 Loads a scene. Previous scene needs to be unregister before or the scenes will overlap. More...
 
void unloadScene ()
 Unloads the currently loaded scene. More...
 
void updateCurrentScene ()
 Updates the current scene. More...
 
void addEntityToCurrentSceneUnload (Entity entity)
 

Detailed Description

Class managing all the scenes for the game.

Constructor & Destructor Documentation

◆ SceneManager()

GameEngine::SceneManager::SceneManager ( )
inline

Default constructor.

◆ ~SceneManager()

GameEngine::SceneManager::~SceneManager ( )
default

Default destructor.

Member Function Documentation

◆ addEntityToCurrentSceneUnload()

void GameEngine::SceneManager::addEntityToCurrentSceneUnload ( Entity  entity)

◆ loadScene()

void GameEngine::SceneManager::loadScene ( const std::string &  name)

Loads a scene. Previous scene needs to be unregister before or the scenes will overlap.

Parameters
nameName of the scene to load.

◆ registerScene()

void GameEngine::SceneManager::registerScene ( const std::string &  name,
std::unique_ptr< IScene > &&  scene 
)

Registers a new scene.

Parameters
nameName of the scene to register. Will be used when loading the scene.
sceneUnique pointer to the scene class to register. The scene will be moved in the SceneManager.

◆ unloadScene()

void GameEngine::SceneManager::unloadScene ( )

Unloads the currently loaded scene.

◆ unregisterScene()

void GameEngine::SceneManager::unregisterScene ( const std::string &  name)

Unregisters a scene.

Parameters
nameName of the scene to unregister.

◆ updateCurrentScene()

void GameEngine::SceneManager::updateCurrentScene ( )

Updates the current scene.


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