You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/animations/AnimationManager.js
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -131,15 +131,15 @@ var AnimationManager = new Class({
131
131
* @param {string} key - The key under which the Animation should be added. The Animation will be updated with it. Must be unique.
132
132
* @param {Phaser.Animations.Animation} animation - The Animation which should be added to the Animation Manager.
133
133
*
134
-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
134
+
* @return {this} This Animation Manager.
135
135
*/
136
136
add: function(key,animation)
137
137
{
138
138
if(this.anims.has(key))
139
139
{
140
140
console.warn('Animation key exists: '+key);
141
141
142
-
return;
142
+
returnthis;
143
143
}
144
144
145
145
animation.key=key;
@@ -457,7 +457,7 @@ var AnimationManager = new Class({
457
457
* @fires Phaser.Animations.Events#PAUSE_ALL
458
458
* @since 3.0.0
459
459
*
460
-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
460
+
* @return {this} This Animation Manager.
461
461
*/
462
462
pauseAll: function()
463
463
{
@@ -480,7 +480,7 @@ var AnimationManager = new Class({
480
480
* @param {string} key - The key of the animation to play on the Game Object.
481
481
* @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on.
482
482
*
483
-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
483
+
* @return {this} This Animation Manager.
484
484
*/
485
485
play: function(key,child)
486
486
{
@@ -493,7 +493,7 @@ var AnimationManager = new Class({
493
493
494
494
if(!anim)
495
495
{
496
-
return;
496
+
returnthis;
497
497
}
498
498
499
499
for(vari=0;i<child.length;i++)
@@ -536,7 +536,7 @@ var AnimationManager = new Class({
536
536
* @fires Phaser.Animations.Events#RESUME_ALL
537
537
* @since 3.0.0
538
538
*
539
-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
539
+
* @return {this} This Animation Manager.
540
540
*/
541
541
resumeAll: function()
542
542
{
@@ -564,7 +564,7 @@ var AnimationManager = new Class({
564
564
* @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component.
565
565
* @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by.
566
566
*
567
-
* @return {Phaser.Animations.AnimationManager} This Animation Manager.
567
+
* @return {this} This Animation Manager.
568
568
*/
569
569
staggerPlay: function(key,children,stagger)
570
570
{
@@ -579,7 +579,7 @@ var AnimationManager = new Class({
0 commit comments