diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-05 21:10:07 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-05 21:10:07 +0100 |
commit | 9604616001ac273f2c966c3c829638e905def7bf (patch) | |
tree | 7e958c2b658a4dbc9e79068d7309513efa928937 /src/crepe/api/Script.h | |
parent | 018a451051669506be447aa925ecb6a9f5aaf418 (diff) | |
parent | 1f4e961d7f9d6887c807cac1a362f2d178b0860b (diff) |
merge with master and keypressed added to game
Diffstat (limited to 'src/crepe/api/Script.h')
-rw-r--r-- | src/crepe/api/Script.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h index a0870cb..1474a09 100644 --- a/src/crepe/api/Script.h +++ b/src/crepe/api/Script.h @@ -2,11 +2,12 @@ #include <vector> +#include "../manager/EventManager.h" +#include "system/CollisionSystem.h" +#include "../manager/Mediator.h" #include "../types.h" #include "../util/OptionalRef.h" -#include "EventManager.h" - namespace crepe { class ScriptSystem; @@ -106,6 +107,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 +167,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: |