Skip to main content

EventHandler.Add(function function)

Adds a new function as a handler. The value must be a function type to properly attach it.

Parameters:

NameTypeDescription
functionfunctionThe function which will called when event invoked

Usage

---@type EventHandler
local eventhandler;

---@type function
local function;


eventhandler.Add(function)

Example

local function myFunction()
Debug.Log("Hello There");
end

local event = EventHandler();
event.Add(myFunction);