Skip to content

Commit b00acb1

Browse files
committed
Revert "Allow for chaining multible animations"
This reverts commit a5eacab.
1 parent a5eacab commit b00acb1

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

src/gameobjects/components/Animation.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,6 @@ var Animation = new Class({
8787
*/
8888
this.nextAnim = null;
8989

90-
/**
91-
* A queue of chained keys of the next Animations to be loaded into this Animation Controller when the current animation completes.
92-
*
93-
* @name Phaser.GameObjects.Components.Animation#nextAnim
94-
* @type {Array}
95-
* @default []
96-
*/
97-
this.nextAnimsQueue = [];
98-
9990
/**
10091
* Time scale factor.
10192
*
@@ -330,11 +321,7 @@ var Animation = new Class({
330321
key = key.key;
331322
}
332323

333-
if(this.nextAnim === null){
334-
this.nextAnim = key;
335-
}else{
336-
this.nextAnimsQueue.push(key);
337-
}
324+
this.nextAnim = key;
338325

339326
return this.parent;
340327
},
@@ -863,7 +850,7 @@ var Animation = new Class({
863850
{
864851
var key = this.nextAnim;
865852

866-
this.nextAnim = this.nextAnimsQueue.length > 0 ? this.nextAnimsQueue.shift() : null;
853+
this.nextAnim = null;
867854

868855
this.play(key);
869856
}

0 commit comments

Comments
 (0)