Fixed issue where Stage.update wasn't called.

This commit is contained in:
photonstorm committed 2014-02-25 04:58:09 +00:00
1 parent a1b502fc06
commit a24d252430
2 files changed
+47 -18

No files matched your search

+9 -18
View File
@@ -161,6 +161,15 @@ Phaser.Stage.prototype.postUpdate = function () {
}
}
if (this.checkOffsetInterval !== false)
{
if (this.game.time.now > this._nextOffsetCheck)
{
Phaser.Canvas.getOffset(this.game.canvas, this.offset);
this._nextOffsetCheck = this.game.time.now + this.checkOffsetInterval;
}
}
}
/**
@@ -284,24 +293,6 @@ Phaser.Stage.prototype.checkVisibility = function () {
}
/**
* Runs Stage processes that need periodic updates, such as the offset checks.
* @method Phaser.Stage#update
*/
Phaser.Stage.prototype.update = function () {
if (this.checkOffsetInterval !== false)
{
if (this.game.time.now > this._nextOffsetCheck)
{
Phaser.Canvas.getOffset(this.game.canvas, this.offset);
this._nextOffsetCheck = this.game.time.now + this.checkOffsetInterval;
}
}
}
/**
* This method is called when the document visibility is changed.
* @method Phaser.Stage#visibilityChange