Skip to content

Signal

Inherits: Class

Methods

CallbackToSet

lua
function Signal:CallbackToSet()
  -> fun()

Returns a callback function which sets the signal when called.

Returns:

TypeDescription
fun()

Clear

lua
function Signal:Clear()

Clears the signal.

GetName

lua
function Signal:GetName()
  -> string

Gets the name for debugging purposes.

Returns:

TypeDescription
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:

NameTypeDescription
handlerfun(input: Signal)The handler or nil to clear the handler

__tostring

lua
function Signal:__tostring()

Functions

New

lua
function Signal.New(name)
  -> Signal

Create a new signal.

Parameters:

NameTypeDescription
namestringThe name of the signal for debugging purposes

Returns:

TypeDescription
Signal