diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-12 15:05:33 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-12 15:05:33 +0100 |
commit | 641e202607b0f694df6662532f0165022c0f8621 (patch) | |
tree | 0701bbfe705a95b670c8dfcb5eaabf6007556831 /src/crepe/api/Script.cpp | |
parent | dd7d5cf6b01b8a6a4238b66c27861ee76522067e (diff) | |
parent | 05a33d4793520fa84a93bc79882ef29d39cd08e5 (diff) |
merge master
Diffstat (limited to 'src/crepe/api/Script.cpp')
-rw-r--r-- | src/crepe/api/Script.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/api/Script.cpp b/src/crepe/api/Script.cpp index 4091fd4..753a9e3 100644 --- a/src/crepe/api/Script.cpp +++ b/src/crepe/api/Script.cpp @@ -8,8 +8,7 @@ using namespace crepe; using namespace std; Script::~Script() { - Mediator & mediator = this->mediator; - EventManager & mgr = mediator.event_manager; + EventManager & mgr = this->mediator->event_manager; for (auto id : this->listeners) { mgr.unsubscribe(id); } @@ -21,7 +20,8 @@ void Script::subscribe(const EventHandler<CollisionEvent> & callback) { } void Script::set_next_scene(const string & name) { - Mediator & mediator = this->mediator; - SceneManager & mgr = mediator.scene_manager; + SceneManager & mgr = this->mediator->scene_manager; mgr.set_next_scene(name); } + +SaveManager & Script::get_save_manager() const { return this->mediator->save_manager; } |