new Events(sprite)
Parameters:
Name | Type | Description |
---|---|---|
sprite |
Phaser.Sprite | A reference to Description. |
- Source:
The Events component is a collection of events fired by the parent game object.
For example to tell when a Sprite has been added to a new group:
sprite.events.onAddedToGroup.add(yourFunction, this);
Where yourFunction
is the function you want called when this event occurs.
Note that the Input related events only exist if the Sprite has had inputEnabled
set to true
.
Name | Type | Description |
---|---|---|
sprite |
Phaser.Sprite | A reference to Description. |