mirror of
https://github.com/wassname/phaser.git
synced 2026-07-08 00:10:32 +08:00
Fixed stupid error in destroy().
This commit is contained in:
@@ -499,7 +499,14 @@ Phaser.Sprite.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.input)
|
||||
|
||||
Reference in New Issue
Block a user