aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/LoopManager.h
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-11-21 20:40:08 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-11-21 20:40:08 +0100
commitd58a059fd6398527274e77a37b65aa105c8a778b (patch)
tree26d345400739ec685bbe6b26d8d789bbe33b02aa /src/crepe/api/LoopManager.h
parentfaa9adb84ad3f675587b52fba79cf44b7bdd2034 (diff)
parent115d6f50152dc018073345800ca90b85846ebaa9 (diff)
merge with master
Diffstat (limited to 'src/crepe/api/LoopManager.h')
-rw-r--r--src/crepe/api/LoopManager.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h
index 37f13ac..13e6dac 100644
--- a/src/crepe/api/LoopManager.h
+++ b/src/crepe/api/LoopManager.h
@@ -8,11 +8,24 @@
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 Add a new concrete scene to the scene manager
+ *
+ * \tparam T Type of concrete scene
+ */
+ template <typename T>
+ void add_scene();
+
private:
/**
* \brief Setup function for one-time initialization.
@@ -54,12 +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,9 +87,9 @@ private:
private:
//! Component manager instance
ComponentManager component_manager{};
-public:
//! Scene manager instance
SceneManager scene_manager{component_manager};
+
private:
/**
* \brief Collection of System instances