Sprite.destroy is back in business.

This commit is contained in:
photonstorm
2013-10-13 01:29:57 +01:00
parent 574f4f351b
commit e98aa205ea
5 changed files with 72 additions and 5 deletions
+24
View File
@@ -580,6 +580,30 @@ Phaser.Sprite.prototype.kill = function() {
}
/**
* Description.
*
* @method Phaser.Sprite.prototype.destroy
*/
Phaser.Sprite.prototype.destroy = function() {
if (this.group)
{
this.group.remove(this);
}
this.input.destroy();
this.events.destroy();
this.animations.destroy();
this.alive = false;
this.exists = false;
this.visible = false;
this.game = null;
}
/**
* Description.
*