fix event
This commit is contained in:
@@ -39,4 +39,14 @@ namespace VE
|
||||
// как-то не прикольно так !!!
|
||||
bool is_parallele{ false };
|
||||
};
|
||||
|
||||
struct event_manager : public hack::patterns::singleton<event_manager>
|
||||
{
|
||||
std::vector<VE::event_fn<VE::event>> funcs;
|
||||
void connect(event_fn<event> fn) { funcs.push_back(fn); };
|
||||
void emit(event e)
|
||||
{
|
||||
for(auto& f : funcs) f(e);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user