Events#onDestroy

onDestroy : Phaser.Signal This signal is dispatched when the Game Object is destroyed.This happens when Sprite.destroy() is called, or Group.destroy() with destroyChildren set to true.It is sent one argument:{any} The Game Object that was destroyed. Source code: gameobjects/components/Events.js (Line 109)

Events#onAnimationStart

onAnimationStart : Phaser.Signal This signal is dispatched if the Game Object has the AnimationManager component,and an Animation has been played.You can also listen to Animation.onStart rather than via the Game Objects events.It is sent two arguments:{any} The Game Object that received the event.{Phaser.Animation} The Phaser.Animation that was started. Source code: gameobjects/components/Events.js (Line 238)

Events#onAnimationLoop

onAnimationLoop : Phaser.Signal This signal is dispatched if the Game Object has the AnimationManager component,and an Animation has looped playback.You can also listen to Animation.onLoop rather than via the Game Objects events.It is sent two arguments:{any} The Game Object that received the event.{Phaser.Animation} The Phaser.Animation that looped. Source code: gameobjects/components/Events.js (Line 260)

Events#onAnimationComplete

onAnimationComplete : Phaser.Signal This signal is dispatched if the Game Object has the AnimationManager component,and an Animation has been stopped (via animation.stop() and the dispatchComplete argument has been set.You can also listen to Animation.onComplete rather than via the Game Objects events.It is sent two arguments:{any} The Game Object that received the event.{Phaser.Animation} The Phaser.Animation that was stopped. Source code: gameobjects/components/Events.js (Line 249)

Events#onAddedToGroup

onAddedToGroup : Phaser.Signal This signal is dispatched when this Game Object is added to a new Group.It is sent two arguments:{any} The Game Object that was added to the Group.{Phaser.Group} The Group it was added to. Source code: gameobjects/components/Events.js (Line 84)

Events#Events

new Events(sprite) The Events component is a collection of events fired by the parent Game Object. Phaser uses what are known as 'Signals' for all event handling. All of the events inthis class are signals you can subscribe to, much in the same way you'd "listen" foran event. For example to tell when a Sprite has been added to a new group, you can bind a functionto the onAddedToGroup signal: sprite.events.onAddedToGroup.add(yourFunction, this); Where yourFunction is the function you want call

Events#destroy()

destroy() Removes all events. Source code: gameobjects/components/Events.js (Line 43)

Event#type

[readonly] type : string The string name of the event that this represents. Source code: plugins/path/EventTarget.js (Line 244)

Event#timeStamp

[readonly] timeStamp : number The timestamp when the event occurred. Source code: plugins/path/EventTarget.js (Line 265)

Event#target

[readonly] target : Object The original target the event triggered on. Source code: plugins/path/EventTarget.js (Line 235)