From d3d207b9a2445a9219274466bae2254e1c3db268 Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 09:06:52 +0100 Subject: Added SceneManger to LoopManager --- src/crepe/api/LoopManager.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/crepe/api/LoopManager.h') diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index f6904be..25b833a 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -4,6 +4,7 @@ #include "../ComponentManager.h" #include "../system/System.h" +#include "api/SceneManager.h" namespace crepe { @@ -12,6 +13,14 @@ public: void start(); LoopManager(); + /** + * \brief Add a new concrete scene to the scene manager + * + * \tparam T Type of concrete scene + */ + template + void add_scene(); + private: /** * \brief Setup function for one-time initialization. @@ -53,12 +62,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. * @@ -71,6 +82,8 @@ private: private: //! Component manager instance ComponentManager component_manager{}; + //! Scene manager instance + SceneManager scene_manager{component_manager}; private: /** -- cgit v1.2.3 From 2f7f7ef167924be7db75aae2cd3f16ec50323980 Mon Sep 17 00:00:00 2001 From: max-001 Date: Thu, 21 Nov 2024 09:16:08 +0100 Subject: Added Doxygen --- src/crepe/api/LoopManager.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/crepe/api/LoopManager.h') diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index 25b833a..13e6dac 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -8,6 +8,11 @@ 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(); -- cgit v1.2.3