diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-28 10:13:11 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-28 10:13:11 +0100 |
commit | 6fd7cec7d4bbf5aeb361b3f1337671bb0f9af61b (patch) | |
tree | 01f6977c66a1e07e07aae42358a7e1a4e55ef53c /src/crepe/api/Script.h | |
parent | d1eed940b8119e95a14f1d08bf26184c7f0a0d8f (diff) |
manager mediator refactor
Diffstat (limited to 'src/crepe/api/Script.h')
-rw-r--r-- | src/crepe/api/Script.h | 16 |
1 files changed, 10 insertions, 6 deletions
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 <typename EventType> void subscribe(const EventHandler<EventType> & 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<bool> active; - //! Reference to component manager instance - OptionalRef<ComponentManager> component_manager; - //! Reference to event manager instance - OptionalRef<EventManager> event_manager; + //! Mediator reference + OptionalRef<Mediator> mediator; //! \} private: |