diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-21 10:00:43 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-21 10:00:43 +0100 |
commit | e7facf23888c38e09128749822c8e7d2b1d7e2fe (patch) | |
tree | b89d956bffd98b3e7bece0399a5090300dc1e19d /src/crepe/api/SceneManager.h | |
parent | e2f085c444a8b37af65816e10bf366e6860d25c2 (diff) | |
parent | 1bc04b371f2cc8740f2ee039f75101922da671d6 (diff) |
Merge branch 'master' into loek/util
Diffstat (limited to 'src/crepe/api/SceneManager.h')
-rw-r--r-- | src/crepe/api/SceneManager.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/crepe/api/SceneManager.h b/src/crepe/api/SceneManager.h index e854794..45ba668 100644 --- a/src/crepe/api/SceneManager.h +++ b/src/crepe/api/SceneManager.h @@ -1,7 +1,6 @@ #pragma once #include <memory> -#include <queue> #include <vector> #include "Scene.h" @@ -10,8 +9,15 @@ namespace crepe { class ComponentManager; +/** + * \brief Manages scenes + * + * This class manages scenes. It can add new scenes and load them. It also manages the current scene + * and the next scene. + */ class SceneManager { public: + //! \param mgr Reference to the ComponentManager SceneManager(ComponentManager & mgr); public: @@ -19,10 +25,9 @@ public: * \brief Add a new concrete scene to the scene manager * * \tparam T Type of concrete scene - * \param name Name of new scene */ template <typename T> - void add_scene(const std::string & name); + void add_scene(); /** * \brief Set the next scene * @@ -35,8 +40,11 @@ public: void load_next_scene(); private: + //! Vector of concrete scenes (added by add_scene()) std::vector<std::unique_ptr<Scene>> scenes; + //! Next scene to load std::string next_scene; + //! Reference to the ComponentManager ComponentManager & component_manager; }; |