Name | Type | Description |
---|---|---|
name |
string |
The function name that will be executed on the listeners added to this Runner. |
Members
true
if there are no this Runner contains no listeners
The name of the runner.
Methods
Add a listener to the Runner
Runners do not need to have scope or functions passed to them. All that is required is to pass the listening object and ensure that it has contains a function that has the same name as the name provided to the Runner when it was created.
E.g. A listener passed to this Runner will require a 'complete' function.
import { Runner } from '@pixi/runner';
const complete = new Runner('complete');
The scope used will be the object itself.
Name | Type | Description |
---|---|---|
item |
any |
The object that will be listening. |
Returns:
Type | Description |
---|---|
this |
Check to see if the listener is already in the Runner
Name | Type | Description |
---|---|---|
item |
any |
The listener that you would like to check. |
Returns:
Type | Description |
---|---|
boolean |
Remove all references, don't use after this.
Alias for emit
- See:
Dispatch/Broadcast Runner to all listeners added to the queue.
Name | Type | Attributes | Description |
---|---|---|---|
params |
any |
<optional> |
(optional) parameters to pass to each listener |
Returns:
Type | Description |
---|---|
this |
Remove a single listener from the dispatch queue.
Name | Type | Description |
---|---|---|
item |
any |
The listener that you would like to remove. |
Returns:
Type | Description |
---|---|
this |
Remove all listeners from the Runner
Returns:
Type | Description |
---|---|
this |
Alias for emit
- See: