fix event manager

This commit is contained in:
2025-03-06 09:26:04 +03:00
parent c5b7cfcd53
commit 77b626fb8c
6 changed files with 7 additions and 30 deletions

View File

@@ -10,9 +10,7 @@
void update() override;\
void on_event(VE::event e) override
// #define VE_CONNECT(DEF_NAME, DEF_CLASS) VE::event_manager::instance().connect(DEF_NAME, std::bind(&DEF_CLASS::on_event, this, std::placeholders::_1));
#define VE_CONNECT(DEF_NAME, DEF_CLASS) VE::event_manager::instance().connect(DEF_NAME, this, &DEF_CLASS::on_event);
#define VE_CONNECT(DEF_CLASS) VE::event_manager::instance().connect(this, &DEF_CLASS::on_event);
#define VE_EMIT(e) VE::event_manager::instance().emit(e)