Detailed documentation of the event system: Armory Wiki: Events.

Static methods

@:value({ mask : -1 })staticadd(name:String, onEvent:() ‑> Void, mask:Int = -1):TEvent

Add a listener to the event with the given name and return the corresponding listener object. The onEvent callback will be called when a matching event is sent.

For an explanation of the mask value, please refer to the wiki.

staticget(name:String):Array<TEvent>

Return the array of event listeners registered for events with the given name, or null if no listener is currently registered for the event.

staticremove(name:String):Void

Remove all listeners that listen to events with the given name.

staticremoveListener(event:TEvent):Void

Remove a specific listener. If the listener is not registered/added, this function does nothing.

@:value({ mask : -1 })staticsend(name:String, mask:Int = -1):Void

Send an event with the given name to all corresponding listeners. This function directly executes the onEvent callbacks of those listeners.

For an explanation of the mask value, please refer to the wiki.