Fixed stupid error in destroy().

This commit is contained in:
photonstorm
2014-02-28 06:17:18 +00:00
parent e45a929b00
commit 4562939e4e
7 changed files with 49 additions and 6 deletions
+8 -1
View File
@@ -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;