ScriptEvent
Methods
Method |
Description |
---|---|
Adds script.methodName as an event handler. |
|
Adds script.methodName as an event handler with a data argument. |
|
Removes script.methodName from the list of event handlers. |
|
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()
-
void AddListener(DynValue script, string methodName)