Appearance
Signal
Inherits: Class
Methods
CallbackToSet
lua
function Signal:CallbackToSet()
-> fun()Returns a callback function which sets the signal when called.
Returns:
| Type | Description |
|---|---|
fun() |
Clear
lua
function Signal:Clear()Clears the signal.
GetName
lua
function Signal:GetName()
-> stringGets the name for debugging purposes.
Returns:
| Type | Description |
|---|---|
string |
IsSet
lua
function Signal:IsSet()Clears the signal.
Set
lua
function Signal:Set()Sets the signal
SetHandler
lua
function Signal:SetHandler(handler)Sets the handler for when the signal is set
Parameters:
| Name | Type | Description |
|---|---|---|
handler | fun(input: Signal) | The handler or nil to clear the handler |
__tostring
lua
function Signal:__tostring()Functions
New
lua
function Signal.New(name)
-> SignalCreate a new signal.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | The name of the signal for debugging purposes |
Returns:
| Type | Description |
|---|---|
Signal |