aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/LoopManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/LoopManager.h')
-rw-r--r--src/crepe/api/LoopManager.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h
index b18c9d1..13e6dac 100644
--- a/src/crepe/api/LoopManager.h
+++ b/src/crepe/api/LoopManager.h
@@ -4,19 +4,27 @@
#include "../ComponentManager.h"
#include "../system/System.h"
+#include "api/SceneManager.h"
namespace crepe {
+/**
+ * \brief Main game loop manager
+ *
+ * This class is responsible for managing the game loop, including initialization and updating.
+ */
class LoopManager {
public:
void start();
+ LoopManager();
+
/**
- * \brief Set game running variable
+ * \brief Add a new concrete scene to the scene manager
*
- * \param running running (false = game shutdown, true = game running)
+ * \tparam T Type of concrete scene
*/
- void set_running(bool running);
- LoopManager();
+ template <typename T>
+ void add_scene();
private:
/**
@@ -59,7 +67,14 @@ private:
* This function updates physics and game logic based on LoopTimer's fixed_delta_time.
*/
void fixed_update();
-
+
+ /**
+ * \brief Set game running variable
+ *
+ * \param running running (false = game shutdown, true = game running)
+ */
+ void set_running(bool running);
+
/**
* \brief Function for executing render-related systems.
*
@@ -72,6 +87,8 @@ private:
private:
//! Component manager instance
ComponentManager component_manager{};
+ //! Scene manager instance
+ SceneManager scene_manager{component_manager};
private:
/**