StevEngine
StevEngine is a customizable C++ game engine.
Loading...
Searching...
No Matches
StevEngine::SceneManager Class Reference

Manages multiple scenes and scene transitions. More...

#include <main/SceneManager.hpp>

Public Member Functions

void Init ()
 Initialize scene manager.
 
bool Exists (std::string name)
 Checks if an scene with the specified name exists.
 
SceneGetScene (std::string name)
 Get scene by name.
 
SceneGetActiveScene ()
 Get currently active scene.
 
SceneCreateSceneFromFile (Resources::Resource file, Utilities::StreamType type)
 Create scene from serialized data.
 
SceneCreateScene (std::string name)
 Create empty scene.
 
void SetActiveScene (std::string name)
 Switch to different scene.
 
void ActivateDefault ()
 Ensure a scene is active.
 

Detailed Description

Manages multiple scenes and scene transitions.

Handles creation, loading and switching between scenes. Maintains references to all loaded scenes and the active scene.

Member Function Documentation

◆ ActivateDefault()

void StevEngine::SceneManager::ActivateDefault ( )

Ensure a scene is active.

Creates default scene if none exist. Sets first scene as active if none active.

◆ CreateScene()

Scene & StevEngine::SceneManager::CreateScene ( std::string name)

Create empty scene.

Parameters
nameScene identifier
Returns
Pointer to created scene

◆ CreateSceneFromFile()

Scene & StevEngine::SceneManager::CreateSceneFromFile ( Resources::Resource file,
Utilities::StreamType type )

Create scene from serialized data.

Parameters
fileResource containing scene data
Returns
Pointer to created scene

◆ Exists()

bool StevEngine::SceneManager::Exists ( std::string name)

Checks if an scene with the specified name exists.

Parameters
nameScene identifier
Returns
true if scene exists, otherwise false

◆ GetActiveScene()

Scene & StevEngine::SceneManager::GetActiveScene ( )

Get currently active scene.

Returns
Pointer to active scene

◆ GetScene()

Scene & StevEngine::SceneManager::GetScene ( std::string name)

Get scene by name.

Parameters
nameScene identifier
Returns
Pointer to scene

◆ SetActiveScene()

void StevEngine::SceneManager::SetActiveScene ( std::string name)

Switch to different scene.

Parameters
nameName of scene to activate

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