EventManager
Summary
EventManager global table.
Functions
| Method | Returns |
|---|---|
| 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): voidSubscribes a listener to an event.
Parameters
| Name | Type | Description |
|---|---|---|
| event | string | The name of the event. |
| callback | function | A callback in the form function(...). |
Listen
EventManager.Listen(event: string, inst: any, callback: function): voidSubscribes a listener to an event.
Parameters
| Name | Type | Description |
|---|---|---|
| event | string | The name of the event. |
| inst | any | Object that has callback as one of its instanced methods. |
| callback | function | A callback in the form function(...). |
SetCancelled
EventManager.SetCancelled(isCancelled: boolean): voidSet current running event cancellation to be queued.
Parameters
| Name | Type | Description |
|---|---|---|
| isCancelled | boolean | Set if the event is queued to be cancelled. |