aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/LoopManager.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-24 22:12:31 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-24 22:12:31 +0100
commit24e3f0ea7c5ce90af1276dca49644b5e1ac799f6 (patch)
tree465dd020c1700511a1697267268b3d975caefd48 /src/crepe/api/LoopManager.h
parent6287d4e9068d8bd27a9e62643f54adb69e84befd (diff)
parentbe5ccbe24086d5d4fb407f268c649dcbc36eda6b (diff)
merge
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:
/**