mirror of
https://github.com/wassname/phaser.git
synced 2026-10-02 12:30:54 +08:00
Skip preupdate/update for PIXI hierarchies in which an ancestor doesn't exist
This commit is contained in:
1 parent
e43571980d
commit
7ef5ab8c98
2 files changed
+17
-6
No files matched your search
+11
-4
@@ -72,24 +72,31 @@ Phaser.World.prototype.boot = function () {
|
||||
Phaser.World.prototype.update = function () {
|
||||
|
||||
this.currentRenderOrderID = 0;
|
||||
|
||||
|
||||
if (this.game.stage._stage.first._iNext)
|
||||
{
|
||||
var currentNode = this.game.stage._stage.first._iNext;
|
||||
var skipChildren = false;
|
||||
|
||||
do
|
||||
{
|
||||
if (currentNode['preUpdate'])
|
||||
{
|
||||
currentNode.preUpdate();
|
||||
skipChildren = (currentNode.preUpdate() == false);
|
||||
}
|
||||
|
||||
if (currentNode['update'])
|
||||
{
|
||||
currentNode.update();
|
||||
skipChildren = (currentNode.update() == false) || skipChildren;
|
||||
}
|
||||
|
||||
currentNode = currentNode._iNext;
|
||||
if(skipChildren)
|
||||
{
|
||||
currentNode = currentNode.last._iNext;
|
||||
} else {
|
||||
currentNode = currentNode._iNext;
|
||||
}
|
||||
|
||||
}
|
||||
while (currentNode != this.game.stage._stage.last._iNext)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user