diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-20 12:48:46 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-20 12:48:46 +0100 |
commit | 43c6971591aaff8ada4adc1b1b4146b19d43f8e9 (patch) | |
tree | 8f405ec11d3e7275ea29d1aaf045fd7e70a4dcfb /src/crepe/api/Script.cpp | |
parent | 5537096ea31e778e1604c87f2032168cfc2da22b (diff) | |
parent | 49e7d902ec2b6f509ab79994e7e2626f4bbbccf2 (diff) |
merge master
Diffstat (limited to 'src/crepe/api/Script.cpp')
-rw-r--r-- | src/crepe/api/Script.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/crepe/api/Script.cpp b/src/crepe/api/Script.cpp index b147252..06b535f 100644 --- a/src/crepe/api/Script.cpp +++ b/src/crepe/api/Script.cpp @@ -20,6 +20,21 @@ void Script::subscribe(const EventHandler<CollisionEvent> & callback) { this->subscribe_internal(callback, this->game_object_id); } +template <> +void Script::subscribe(const EventHandler<ButtonExitEvent> & callback) { + this->subscribe_internal(callback, this->game_object_id); +} + +template <> +void Script::subscribe(const EventHandler<ButtonPressEvent> & callback) { + this->subscribe_internal(callback, this->game_object_id); +} + +template <> +void Script::subscribe(const EventHandler<ButtonEnterEvent> & callback) { + this->subscribe_internal(callback, this->game_object_id); +} + void Script::set_next_scene(const string & name) { SceneManager & mgr = this->mediator->scene_manager; mgr.set_next_scene(name); |