mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
Made sure array was cleared on destroy #5159
This commit is contained in:
parent
b8d12916e9
commit
60baaf7708
1 changed files with 4 additions and 3 deletions
|
@ -91,8 +91,8 @@ var Animation = new Class({
|
|||
* A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes.
|
||||
*
|
||||
* @name Phaser.GameObjects.Components.Animation#nextAnimsQueue
|
||||
* @type {Array}
|
||||
* @default []
|
||||
* @type {string[]}
|
||||
* @since 3.24.0
|
||||
*/
|
||||
this.nextAnimsQueue = [];
|
||||
|
||||
|
@ -866,7 +866,7 @@ var Animation = new Class({
|
|||
{
|
||||
var key = this.nextAnim;
|
||||
|
||||
this.nextAnim = this.nextAnimsQueue.length > 0 ? this.nextAnimsQueue.shift() : null;
|
||||
this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null;
|
||||
|
||||
this.play(key);
|
||||
}
|
||||
|
@ -1178,6 +1178,7 @@ var Animation = new Class({
|
|||
|
||||
this.animationManager = null;
|
||||
this.parent = null;
|
||||
this.nextAnimsQueue.length = 0;
|
||||
|
||||
this.currentAnim = null;
|
||||
this.currentFrame = null;
|
||||
|
|
Loading…
Reference in a new issue