From 9a5967006c4b8cd202142517b402b4c75dc8b90b Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 20 Nov 2024 22:49:04 +0100 Subject: add Script::subscribe with specialization for CollisionEvent --- src/crepe/api/Script.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/crepe/api/Script.cpp') diff --git a/src/crepe/api/Script.cpp b/src/crepe/api/Script.cpp index 9ebb074..bac5ab2 100644 --- a/src/crepe/api/Script.cpp +++ b/src/crepe/api/Script.cpp @@ -9,3 +9,7 @@ Script::~Script() { } } +template <> +void Script::subscribe(const EventHandler & callback) { + this->subscribe_internal(callback, this->game_object_id); +} -- cgit v1.2.3