aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Script.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-04 21:50:45 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-04 21:50:45 +0100
commitd941f497c10bb9146bb83c5c4e59e844d0641a04 (patch)
tree7dfdf691175caf8e43a9c7a7e07a1cdd6bfed0ff /src/crepe/api/Script.h
parentd10f220ff6c5d62bb51793a0ef4ee37090161d89 (diff)
parentcfb67ffddb9f4bb0357c2b9df4239bfee7364c5a (diff)
merge master
Diffstat (limited to 'src/crepe/api/Script.h')
-rw-r--r--src/crepe/api/Script.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h
index a0870cb..1b339b0 100644
--- a/src/crepe/api/Script.h
+++ b/src/crepe/api/Script.h
@@ -2,11 +2,11 @@
#include <vector>
+#include "../manager/EventManager.h"
+#include "../manager/Mediator.h"
#include "../types.h"
#include "../util/OptionalRef.h"
-#include "EventManager.h"
-
namespace crepe {
class ScriptSystem;
@@ -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: