mirror of
https://github.com/Kiritow/OpenComputerScripts.git
synced 2024-03-22 13:10:46 +08:00
Add Event Library
This commit is contained in:
parent
8d1afaa9e4
commit
e94259e98b
9
libevent.lua
Normal file
9
libevent.lua
Normal 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
|
Loading…
Reference in New Issue
Block a user