mirror of
https://github.com/wassname/phaser.git
synced 2026-07-18 12:30:44 +08:00
Skip preupdate/update for PIXI hierarchies in which an ancestor doesn't exist
This commit is contained in:
@@ -361,7 +361,9 @@ Phaser.Sprite.prototype.preUpdate = function() {
|
||||
if (!this.exists || (this.group && !this.group.exists))
|
||||
{
|
||||
this.renderOrderID = -1;
|
||||
return;
|
||||
|
||||
// Skip children if not exists
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.lifespan > 0)
|
||||
@@ -371,7 +373,7 @@ Phaser.Sprite.prototype.preUpdate = function() {
|
||||
if (this.lifespan <= 0)
|
||||
{
|
||||
this.kill();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,6 +401,8 @@ Phaser.Sprite.prototype.preUpdate = function() {
|
||||
this.body.preUpdate();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user