aboutsummaryrefslogtreecommitdiff
path: root/src/test/CollisionTest.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-11-22 16:11:39 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-11-22 16:11:39 +0100
commitbcf57e81f68913049f84cabb66871931c8f47b2b (patch)
tree5f04d161a85bbea27ca9ad8e000a9129a447e88a /src/test/CollisionTest.cpp
parent3f63143b4005936da446fb2cdbbd1072b47fc8c1 (diff)
script fix
Diffstat (limited to 'src/test/CollisionTest.cpp')
-rw-r--r--src/test/CollisionTest.cpp7
1 files changed, 3 insertions, 4 deletions
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<void(const CollisionEvent& ev)> 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<CollisionEvent>([this](const CollisionEvent & ev) {
- return this->on_collision(ev);
- }, this->get_game_object_id());
+ subscribe<CollisionEvent>([](const CollisionEvent&) -> bool {
+ return true;
+ });
}
};