Methods
emit() → {EventSystem}
Alias to trigger method
- Source:
Returns:
- Type
- EventSystem
off(name, callback) → {EventSystem}
Detach a callback from an event.
This will only work if the callback is not anonymous
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | name of the event |
callback |
function | the callback function |
- Source:
Returns:
- Type
- EventSystem
offAll(name) → {EventSystem}
Remove all callbacks for an event
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | name of the event |
- Source:
Returns:
- Type
- EventSystem
on(name, callback) → {EventSystem}
Attaches a callback to an event
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | name of the event |
callback |
function | the callback function |
- Source:
Returns:
- Type
- EventSystem
trigger() → {EventSystem}
Run all callbacks attached to an event
- Source:
Returns:
- Type
- EventSystem