Event_t

Event usertype. An instance of this type can be found in events.

Add

Method

Adds a callback to the event.

Arguments

Name
Type
Description

fn

function

Callback function. Arguments that are accepted by the function are dictated by the event instance.

Returns

Nothing.

Example

events.presentQueue:Add(function ()
    -- will be called every time game queues a frame for rendering
end);

Remove

Method

Removes a callback from the event.

Arguments

Name
Type
Description

fn

function

Callback function, that was earlier passed to the add() function.

Returns

Nothing.

Example

Last updated