From bcf57e81f68913049f84cabb66871931c8f47b2b Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Fri, 22 Nov 2024 16:11:39 +0100 Subject: script fix --- src/test/CollisionTest.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/test') diff --git a/src/test/CollisionTest.cpp b/src/test/CollisionTest.cpp index c175eb4..bbf6348 100644 --- a/src/test/CollisionTest.cpp +++ b/src/test/CollisionTest.cpp @@ -25,7 +25,6 @@ using namespace testing; class CollisionHandler : public Script { public: int box_id; - EventManager & evmgr = EventManager::get_instance(); function test_fn = [](const CollisionEvent & ev) { }; CollisionHandler(int box_id) { @@ -42,9 +41,9 @@ public: //Log::logf("Box {} script init()", box_id); // TODO: this should be built into script - evmgr.subscribe([this](const CollisionEvent & ev) { - return this->on_collision(ev); - }, this->get_game_object_id()); + subscribe([](const CollisionEvent&) -> bool { + return true; + }); } }; -- cgit v1.2.3