aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/SceneManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/SceneManager.h')
-rw-r--r--src/crepe/api/SceneManager.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/crepe/api/SceneManager.h b/src/crepe/api/SceneManager.h
index e854794..f6f62cd 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);
+ template <typename T, typename... Args>
+ void add_scene(Args &&... args);
/**
* \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;
};