Skip to content

Commit cd80b27

Browse files
committed
Updated jsdocs
1 parent 3d36215 commit cd80b27

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/gameobjects/components/Animation.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ var Class = require('../../utils/Class');
1414
*
1515
* You can also listen for a specific animation by appending a hyphen and its key to the event name. For example,
1616
* if you have an animation called `explode`, you can listen for `sprite.on('animationstart-explode', listener)`.
17+
*
18+
* You can also listen for the `start` event from the Animation itself: `animation.on('start', listener)`.
1719
*
1820
* @event Phaser.GameObjects.Components.Animation#onStartEvent
1921
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
@@ -28,6 +30,8 @@ var Class = require('../../utils/Class');
2830
*
2931
* You can also listen for a specific animation by appending a hyphen and its key to the event name. For example,
3032
* if you have an animation called `explode`, you can listen for `sprite.on('animationrestart-explode', listener)`.
33+
*
34+
* You can also listen for the `restart` event from the Animation itself: `animation.on('restart', listener)`.
3135
*
3236
* @event Phaser.GameObjects.Components.Animation#onRestartEvent
3337
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
@@ -42,6 +46,8 @@ var Class = require('../../utils/Class');
4246
*
4347
* You can also listen for a specific animation by appending a hyphen and its key to the event name. For example,
4448
* if you have an animation called `explode`, you can listen for `sprite.on('animationrepeat-explode', listener)`.
49+
*
50+
* You can also listen for the `repeat` event from the Animation itself: `animation.on('repeat', listener)`.
4551
*
4652
* @event Phaser.GameObjects.Components.Animation#onRepeatEvent
4753
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.
@@ -72,6 +78,8 @@ var Class = require('../../utils/Class');
7278
*
7379
* You can also listen for a specific animation by appending a hyphen and its key to the event name. For example,
7480
* if you have an animation called `explode`, you can listen for `sprite.on('animationcomplete-explode', listener)`.
81+
*
82+
* You can also listen for the `complete` event from the Animation itself: `animation.on('complete', listener)`.
7583
*
7684
* @event Phaser.GameObjects.Components.Animation#onCompleteEvent
7785
* @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation.

0 commit comments

Comments
 (0)