From 6fd7cec7d4bbf5aeb361b3f1337671bb0f9af61b Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Thu, 28 Nov 2024 10:13:11 +0100 Subject: manager mediator refactor --- src/crepe/api/Script.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/crepe/api/Script.h') diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h index a0870cb..e1f86b2 100644 --- a/src/crepe/api/Script.h +++ b/src/crepe/api/Script.h @@ -4,8 +4,8 @@ #include "../types.h" #include "../util/OptionalRef.h" - -#include "EventManager.h" +#include "../manager/Mediator.h" +#include "../manager/EventManager.h" namespace crepe { @@ -106,6 +106,12 @@ protected: template void subscribe(const EventHandler & callback); + /** + * \brief Set the next scene using SceneManager + * \see SceneManager::set_next_scene + */ + void set_next_scene(const std::string & name); + //! \} private: @@ -160,10 +166,8 @@ private: game_object_id_t game_object_id; //! Reference to parent component OptionalRef active; - //! Reference to component manager instance - OptionalRef component_manager; - //! Reference to event manager instance - OptionalRef event_manager; + //! Mediator reference + OptionalRef mediator; //! \} private: -- cgit v1.2.3