Skip to content

Commit d46d9f3

Browse files
committed
Fixed this return types for Phaser.Animations.AnimationManager
1 parent 5c040aa commit d46d9f3

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/animations/AnimationManager.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ var AnimationManager = new Class({
131131
* @param {string} key - The key under which the Animation should be added. The Animation will be updated with it. Must be unique.
132132
* @param {Phaser.Animations.Animation} animation - The Animation which should be added to the Animation Manager.
133133
*
134-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
134+
* @return {this} This Animation Manager.
135135
*/
136136
add: function (key, animation)
137137
{
138138
if (this.anims.has(key))
139139
{
140140
console.warn('Animation key exists: ' + key);
141141

142-
return;
142+
return this;
143143
}
144144

145145
animation.key = key;
@@ -457,7 +457,7 @@ var AnimationManager = new Class({
457457
* @fires Phaser.Animations.Events#PAUSE_ALL
458458
* @since 3.0.0
459459
*
460-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
460+
* @return {this} This Animation Manager.
461461
*/
462462
pauseAll: function ()
463463
{
@@ -480,7 +480,7 @@ var AnimationManager = new Class({
480480
* @param {string} key - The key of the animation to play on the Game Object.
481481
* @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on.
482482
*
483-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
483+
* @return {this} This Animation Manager.
484484
*/
485485
play: function (key, child)
486486
{
@@ -493,7 +493,7 @@ var AnimationManager = new Class({
493493

494494
if (!anim)
495495
{
496-
return;
496+
return this;
497497
}
498498

499499
for (var i = 0; i < child.length; i++)
@@ -536,7 +536,7 @@ var AnimationManager = new Class({
536536
* @fires Phaser.Animations.Events#RESUME_ALL
537537
* @since 3.0.0
538538
*
539-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
539+
* @return {this} This Animation Manager.
540540
*/
541541
resumeAll: function ()
542542
{
@@ -564,7 +564,7 @@ var AnimationManager = new Class({
564564
* @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component.
565565
* @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by.
566566
*
567-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
567+
* @return {this} This Animation Manager.
568568
*/
569569
staggerPlay: function (key, children, stagger)
570570
{
@@ -579,7 +579,7 @@ var AnimationManager = new Class({
579579

580580
if (!anim)
581581
{
582-
return;
582+
return this;
583583
}
584584

585585
for (var i = 0; i < children.length; i++)

0 commit comments

Comments
 (0)