EventManager

Summary

EventManager global table.

Functions

MethodReturns
Listen(event: string, callback: function)void
Listen(event: string, inst: any, callback: function)void
SetCancelled(isCancelled: boolean)void

Functions

Listen

EventManager.Listen(event: string, callback: function): void

Subscribes a listener to an event.

Parameters

NameTypeDescription
eventstringThe name of the event.
callbackfunctionA callback in the form function(...).

Listen

EventManager.Listen(event: string, inst: any, callback: function): void

Subscribes a listener to an event.

Parameters

NameTypeDescription
eventstringThe name of the event.
instanyObject that has callback as one of its instanced methods.
callbackfunctionA callback in the form function(...).

SetCancelled

EventManager.SetCancelled(isCancelled: boolean): void

Set current running event cancellation to be queued.

Parameters

NameTypeDescription
isCancelledbooleanSet if the event is queued to be cancelled.