Signal
Allows the creation of custom events.
Constructor¶
Signal.new()¶
Creates a new Signal object.
1 | |
Methods¶
Fire(Variant args...)¶
Fire the event with any number of arguments.
1 | |
Wait()¶
Yields until the next time the event is fired, and returns anything that the fired event passed.
1 | |
WaitPromise()¶
Returns a Promise that resolves when the event fires next.
1 2 3 | |
Connect(Function handler)¶
Connects a function to the event. The function will be called every time the event is fired.
Returns: Connection
1 2 3 | |
DisconnectAll()¶
Disconnects all connected functions.
1 | |
Destroy()¶
Destroys the event, which also disconnects all connections.
1 | |