aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Script.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-11 14:33:12 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-11 14:33:12 +0100
commit68bf20b491b4b7673c2ece7a6497b9faffd44eb1 (patch)
treeec0aa56081bc744b595f1665f048c4d26242884f /src/crepe/api/Script.cpp
parentf64b793ad8e796458c8e175f298e8d13eb3b3459 (diff)
parent78c4a8772526f40c531b5402b56932b0a41e22e8 (diff)
feedback but error after conflict
Diffstat (limited to 'src/crepe/api/Script.cpp')
-rw-r--r--src/crepe/api/Script.cpp8
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; }