Skip to content

Commit

Permalink
codePaused should be set if manually called
Browse files Browse the repository at this point in the history
If pause is called manually, codePaused should be set regardless of whether the game is currently paused or not. This would fix issues where a developer might not want the game to automatically resume when the screen regains focus.
  • Loading branch information
devinb83 committed Jul 14, 2014
1 parent ff5dda7 commit 4a632ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,23 +857,23 @@ Object.defineProperty(Phaser.Game.prototype, "paused", {
if (this._paused === false)
{
this._paused = true;
this._codePaused = true;
this.sound.setMute();
this.time.gamePaused();
this.onPause.dispatch(this);
}
this._codePaused = true;
}
else
{
if (this._paused)
{
this._paused = false;
this._codePaused = false;
this.input.reset();
this.sound.unsetMute();
this.time.gameResumed();
this.onResume.dispatch(this);
}
this._codePaused = false;
}

}
Expand Down

0 comments on commit 4a632ed

Please sign in to comment.