mirror of
https://github.com/wassname/phaser.git
synced 2026-07-15 01:11:26 +08:00
Display Objects now clean-up their children properly on destroy.
This commit is contained in:
@@ -384,6 +384,13 @@ Phaser.Image.prototype.destroy = function() {
|
||||
this.input.destroy();
|
||||
}
|
||||
|
||||
var i = this.children.length;
|
||||
|
||||
while (i--)
|
||||
{
|
||||
this.removeChild(this.children[i]);
|
||||
}
|
||||
|
||||
this.alive = false;
|
||||
this.exists = false;
|
||||
this.visible = false;
|
||||
|
||||
Reference in New Issue
Block a user