mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
change order in destroy method, first clear references then null all values
This commit is contained in:
parent
b77c034f61
commit
41095c2933
1 changed files with 3 additions and 4 deletions
|
@ -371,7 +371,9 @@ Phaser.Animation.prototype = {
|
|||
* @method Phaser.Animation#destroy
|
||||
*/
|
||||
destroy: function () {
|
||||
|
||||
this.game.onPause.remove(this.onPause, this);
|
||||
this.game.onResume.remove(this.onResume, this);
|
||||
|
||||
this.game = null;
|
||||
this._parent = null;
|
||||
this._frames = null;
|
||||
|
@ -383,9 +385,6 @@ Phaser.Animation.prototype = {
|
|||
this.onLoop.dispose();
|
||||
this.onComplete.dispose();
|
||||
|
||||
this.game.onPause.remove(this.onPause, this);
|
||||
this.game.onResume.remove(this.onResume, this);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue