Evospace  0.19.0
Modding API
 
Loading...
Searching...
No Matches
event_system Class Reference

Public Member Functions

handler_i_d sub (int event, luabridge::lua_ref func)
 
void unsub (int event, handler_i_d handlerId)
 

Detailed Description

Global event system

Definition at line 45 of file EventSystem.h.

Member Function Documentation

◆ sub()

handler_i_d event_system::sub ( int event,
luabridge::lua_ref func )

Add callback for event

Parameters
eventEvent type
funcCallback function
Returns
Subscription handle for unsubscription

◆ unsub()

void event_system::unsub ( int event,
handler_i_d handlerId )

Remove callback from event

Parameters
eventEvent type
handlerIdSubscription handle