mirror of
https://github.com/wassname/phaser.git
synced 2026-07-29 11:24:31 +08:00
Fixed stupid error in destroy().
This commit is contained in:
@@ -376,7 +376,14 @@ Phaser.Image.prototype.destroy = function(destroyChildren) {
|
||||
|
||||
if (this.parent)
|
||||
{
|
||||
this.parent.remove(this);
|
||||
if (this.parent.instanceof Phaser.Group)
|
||||
{
|
||||
this.parent.remove(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.parent.removeChild(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.events)
|
||||
|
||||
Reference in New Issue
Block a user