Revert "Allow for chaining multible animations"

This reverts commit a5eacab048.
This commit is contained in:
timo 2020-05-22 13:45:21 +02:00
parent a5eacab048
commit b00acb1838

View file

@ -87,15 +87,6 @@ var Animation = new Class({
*/
this.nextAnim = null;
/**
* A queue of chained keys of the next Animations to be loaded into this Animation Controller when the current animation completes.
*
* @name Phaser.GameObjects.Components.Animation#nextAnim
* @type {Array}
* @default []
*/
this.nextAnimsQueue = [];
/**
* Time scale factor.
*
@ -330,11 +321,7 @@ var Animation = new Class({
key = key.key;
}
if(this.nextAnim === null){
this.nextAnim = key;
}else{
this.nextAnimsQueue.push(key);
}
this.nextAnim = key;
return this.parent;
},
@ -863,7 +850,7 @@ var Animation = new Class({
{
var key = this.nextAnim;
this.nextAnim = this.nextAnimsQueue.length > 0 ? this.nextAnimsQueue.shift() : null;
this.nextAnim = null;
this.play(key);
}