Skip to content

Commit

Permalink
Merge pull request phaserjs#211 from cocoademon/fix_skip_children
Browse files Browse the repository at this point in the history
Fix a silly mistake in skip preupdate/update for PIXI objects
  • Loading branch information
photonstorm committed Nov 20, 2013
2 parents 577e3f8 + 9b6bfa5 commit ca29731
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,20 @@ Phaser.World.prototype.update = function () {
if (this.game.stage._stage.first._iNext)
{
var currentNode = this.game.stage._stage.first._iNext;
var skipChildren = false;
var skipChildren;

do
{
skipChildren = false;

if (currentNode['preUpdate'])
{
skipChildren = (currentNode.preUpdate() == false);
skipChildren = (currentNode.preUpdate() === false);
}

if (currentNode['update'])
{
skipChildren = (currentNode.update() == false) || skipChildren;
skipChildren = (currentNode.update() === false) || skipChildren;
}

if(skipChildren)
Expand Down

0 comments on commit ca29731

Please sign in to comment.