ScriptEvent

Methods

Method

Description

AddListener(script, methodName)

Adds script.methodName as an event handler.

AddListener(script, methodName, listenerData)

Adds script.methodName as an event handler with a data argument.

RemoveListener(script, methodName)

Removes script.methodName from the list of event handlers.

ToString()

Details

class ScriptEvent
void AddListener(DynValue script, string methodName)

Adds script.methodName as an event handler.This handler is called every time the event occurs.

void AddListener(DynValue script, string methodName, DynValue listenerData)

Adds script.methodName as an event handler with a data argument.This handler is called every time the event occurs. In the event listener, access the data value with CurrentEvent.listenerData.

void RemoveListener(DynValue script, string methodName)

Removes script.methodName from the list of event handlers.

string ToString()