aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/SceneManager.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-21 10:00:12 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-21 10:00:12 +0100
commitaa00be5fae68e4ccb7b592f1193d86f09105723a (patch)
tree47fcc6aad7b18723b926608e5177f677e4493801 /src/crepe/api/SceneManager.h
parent502fb8e8d1dcfe10f55fdef2cdfb71afec806204 (diff)
parent1bc04b371f2cc8740f2ee039f75101922da671d6 (diff)
Merge branch 'master' into loek/scripts
Diffstat (limited to 'src/crepe/api/SceneManager.h')
-rw-r--r--src/crepe/api/SceneManager.h14
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;
};