mirror of
https://github.com/wassname/phaser.git
synced 2026-10-08 12:19:14 +08:00
Fixes #382 Error when using InputHandler#onInputUp & sprite destroys itself during the event.
This commit is contained in:
1 parent
0294a4735d
commit
ae74cb02dd
5 files changed
+62
-16
No files matched your search
@@ -491,11 +491,6 @@ Phaser.Sprite.prototype.destroy = function() {
|
||||
this.parent.remove(this);
|
||||
}
|
||||
|
||||
if (this.events)
|
||||
{
|
||||
this.events.destroy();
|
||||
}
|
||||
|
||||
if (this.input)
|
||||
{
|
||||
this.input.destroy();
|
||||
@@ -511,6 +506,11 @@ Phaser.Sprite.prototype.destroy = function() {
|
||||
this.body.destroy();
|
||||
}
|
||||
|
||||
if (this.events)
|
||||
{
|
||||
this.events.destroy();
|
||||
}
|
||||
|
||||
this.alive = false;
|
||||
this.exists = false;
|
||||
this.visible = false;
|
||||
|
||||
Reference in new issue
Block a user