We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b77c034 commit 41095c2Copy full SHA for 41095c2
1 file changed
src/animation/Animation.js
@@ -371,7 +371,9 @@ Phaser.Animation.prototype = {
371
* @method Phaser.Animation#destroy
372
*/
373
destroy: function () {
374
-
+ this.game.onPause.remove(this.onPause, this);
375
+ this.game.onResume.remove(this.onResume, this);
376
+
377
this.game = null;
378
this._parent = null;
379
this._frames = null;
@@ -383,9 +385,6 @@ Phaser.Animation.prototype = {
383
385
this.onLoop.dispose();
384
386
this.onComplete.dispose();
387
- this.game.onPause.remove(this.onPause, this);
- this.game.onResume.remove(this.onResume, this);
388
389
},
390
391
/**
0 commit comments