mirror of
https://github.com/wassname/phaser.git
synced 2026-07-12 00:50:45 +08:00
Sprite.destroy is back in business.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user