ListenerList
The ListenerList allows developers to keep a list of connections that can all be disconnected at the same time. This is useful when creating custom objects that need to be destroyed and cleaned up.
Constructor¶
ListenerList.new()
¶
Creates a new ListenerList instance.
1 |
|
Methods¶
Connect(event, func)
¶
Connect to an event.
Returns: Connection
1 2 3 |
|
BindToRenderStep(name, priority, func)
¶
Exactly the same as RunService:BindToRenderStep. See documentation there.
1 2 3 |
|
BindAction(name, func, btn [, inputTypes...])
¶
The same as ContextActionService:BindAction.
BindActionAtPriority(name, func, btn, priority [, inputTypes...])
¶
The same as ContextActionService:BindActionAtPriority.
DisconnectAll()
¶
Disconnect all events, and unbind both RenderStep and Action bindings.
1 |
|
DisconnectEvents()
¶
Only disconnect events in the list.
DisconnectRenderSteps()
¶
Only unbind any bound RenderSteps.
DisconnectActions()
¶
Only unbind any bound actions.
Destroy()
¶
Alias for DisconnectAll
.