StevEngine
StevEngine is a customizable C++ game engine.
|
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. | |
Scene & | GetScene (std::string name) |
Get scene by name. | |
Scene & | GetActiveScene () |
Get currently active scene. | |
Scene & | CreateSceneFromFile (Resources::Resource file, Utilities::StreamType type) |
Create scene from serialized data. | |
Scene & | CreateScene (std::string name) |
Create empty scene. | |
void | SetActiveScene (std::string name) |
Switch to different scene. | |
void | ActivateDefault () |
Ensure a scene is active. | |
Manages multiple scenes and scene transitions.
Handles creation, loading and switching between scenes. Maintains references to all loaded scenes and the active scene.
void StevEngine::SceneManager::ActivateDefault | ( | ) |
Ensure a scene is active.
Creates default scene if none exist. Sets first scene as active if none active.
Scene & StevEngine::SceneManager::CreateScene | ( | std::string | name | ) |
Scene & StevEngine::SceneManager::CreateSceneFromFile | ( | Resources::Resource | file, |
Utilities::StreamType | type ) |
Create scene from serialized data.
file | Resource containing scene data |
bool StevEngine::SceneManager::Exists | ( | std::string | name | ) |
Checks if an scene with the specified name exists.
name | Scene identifier |
Scene & StevEngine::SceneManager::GetActiveScene | ( | ) |
Get currently active scene.
Scene & StevEngine::SceneManager::GetScene | ( | std::string | name | ) |
void StevEngine::SceneManager::SetActiveScene | ( | std::string | name | ) |
Switch to different scene.
name | Name of scene to activate |