mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Game Objects would not remove themselves from the Scene's shutdown
event handler when destroyed, leading to a build-up over time
This commit is contained in:
parent
0436f1ff6d
commit
6d7ca32e6d
2 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,7 @@ This change has been introduced for `pointerdown`, `pointerup`, `pointermove`, `
|
|||
* Calling `Text.setStyle` would make the Text vanish if you didn't provide a `resolution` property in the style configuration object. Calling `setStyle` now only changes the properties given in the object, leaving any previously changed properties as-is. Fix #4011 (thanks @okcompewter)
|
||||
* In Matter.js if a body had its debug `render.visible` property set to `false` it wouldn't then render any other debug body beyond it. Now it will just skip bodies with hidden debug graphics (thanks @jf908)
|
||||
* If you flagged a Tween as `paused` in its config, never started it, and then called `Tween.stop` it wouldn't ever be removed from the `_pending` array. It's now moved to the Tween Manager's destroy list, ready for removal on the next frame. Fix #4023 (thanks @goldfire)
|
||||
* Game Objects would not remove themselves from the Scene's `shutdown` event handler when destroyed, leading to a build-up over time (thanks @goldfire)
|
||||
|
||||
### Examples, Documentation and TypeScript
|
||||
|
||||
|
|
|
@ -561,6 +561,8 @@ var GameObject = new Class({
|
|||
// Tell the Scene to re-sort the children
|
||||
sys.queueDepthSort();
|
||||
|
||||
sys.events.off('shutdown', this.destroy, this);
|
||||
|
||||
this.active = false;
|
||||
this.visible = false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue