mirror of
https://github.com/wassname/phaser.git
synced 2026-07-02 17:00:42 +08:00
Fixed stupid error in destroy().
This commit is contained in:
@@ -148,7 +148,14 @@ Phaser.Graphics.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);
|
||||
}
|
||||
}
|
||||
|
||||
var i = this.children.length;
|
||||
|
||||
Reference in New Issue
Block a user