Added Group.sort, can sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :)

This commit is contained in:
photonstorm
2013-11-07 04:31:37 +00:00
parent 789f0bb0a1
commit 42cd8bd812
5 changed files with 63 additions and 111 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ Phaser.BitmapText.prototype.destroy = function() {
this.group.remove(this);
}
if (this.canvas.parentNode)
if (this.canvas && this.canvas.parentNode)
{
this.canvas.parentNode.removeChild(this.canvas);
}