Add Event Library

This commit is contained in:
Kirigaya Kazuto 2017-10-23 18:38:37 +08:00
parent 8d1afaa9e4
commit e94259e98b

9
libevent.lua Normal file
View File

@ -0,0 +1,9 @@
local event=require("event")
function AddEventListener(EventString,CallbackFunction)
return event.listen(EventString,CallbackFunction)
end
function RemoveEventListener(ListenerID)
return event.ignore(event.handlers[ListenerID].key,event.handlers[ListenerID].callback)
end