#include <SceneManager.hpp>
|
| | SceneManager ()=default |
| | ~SceneManager ()=default |
| void | SetNextScene (const std::string_view &name) |
| | Set the next scene to load. It will be loaded at the next call of Update.
|
| void | Update (Engine::Core &core) |
| | Unload the current scene and load the next scene.
|
| template<typename TScene> |
| TScene & | RegisterScene (const std::string &name) |
| | Register a scene using a name as a key.
|
| const std::optional< std::string > & | GetCurrentScene () const |
◆ SceneManager()
| Scene::Resource::SceneManager::SceneManager |
( |
| ) |
|
|
default |
◆ ~SceneManager()
| Scene::Resource::SceneManager::~SceneManager |
( |
| ) |
|
|
default |
◆ _getScene()
| std::optional< std::shared_ptr< Scene::Utils::AScene > > Scene::Resource::SceneManager::_getScene |
( |
const std::string & | name | ) |
|
|
nodiscardprivate |
◆ _loadScene()
| void Scene::Resource::SceneManager::_loadScene |
( |
Engine::Core & | core, |
|
|
const std::string & | name ) |
|
private |
◆ _unloadScene()
| void Scene::Resource::SceneManager::_unloadScene |
( |
Engine::Core & | core, |
|
|
const std::string & | name ) |
|
private |
◆ GetCurrentScene()
| const std::optional< std::string > & Scene::Resource::SceneManager::GetCurrentScene |
( |
| ) |
const |
|
inline |
◆ RegisterScene()
template<typename TScene>
| TScene & Scene::Resource::SceneManager::RegisterScene |
( |
const std::string & | name | ) |
|
|
inline |
Register a scene using a name as a key.
- Template Parameters
-
| TScene | type of the scene to register |
- Parameters
-
- Returns
- reference of the registered scene
◆ SetNextScene()
| void Scene::Resource::SceneManager::SetNextScene |
( |
const std::string_view & | name | ) |
|
|
inline |
Set the next scene to load. It will be loaded at the next call of Update.
- Parameters
-
| name | name of the scene to load |
◆ Update()
| void Scene::Resource::SceneManager::Update |
( |
Engine::Core & | core | ) |
|
Unload the current scene and load the next scene.
- Parameters
-
| core | core that contains all components |
◆ _currentScene
| std::optional<std::string> Scene::Resource::SceneManager::_currentScene |
|
private |
◆ _nextScene
| std::optional<std::string> Scene::Resource::SceneManager::_nextScene |
|
private |
◆ _scenes
The documentation for this class was generated from the following files: