mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-03 19:17:27 -04:00
Updated API Event (markdown)
parent
4b10126153
commit
ac29a2470a
@ -2,6 +2,7 @@ This API provides a rudimentary event system. It is primarily intended to be use
|
||||
|
||||
- `event.listen(name: string, callback: function): boolean`
|
||||
Register a new event listener that should be called for events with the specified name. When registering for signal events, this is the name of the signal. Returns `true` if the listener was successfully registered, `false` if it already was registered for this event type.
|
||||
Note that event listeners may return `false` to unregister themselves (equivalent to calling `event.ignore` and passing the listener with the event name it was registered for).
|
||||
- `event.ignore(name: string, callback: function): boolean`
|
||||
Unregister a previously registered event listener. Returns `true` if the event listener was removed, `false` if the listener was not registered.
|
||||
- `event.timer(interval: number, callback: function[, times: number]): number`
|
||||
|
Loading…
x
Reference in New Issue
Block a user