Debug.preUpdate was still being called in the Game Loop even if enableDebug was set to false (thanks @qdrj, #995)

This commit is contained in:
photonstorm 2014-07-11 11:48:03 +01:00
parent 8c486f5c18
commit 74679922d1
2 changed files with 13 additions and 3 deletions

View file

@ -55,6 +55,9 @@ Version 2.1.0 - "Shienar" - -in development-
### Bug Fixes
* Fixed pixel perfect dragging (thanks @jeroenverfallie, fix #996)
* Debug.preUpdate was still being called in the Game Loop even if enableDebug was set to false (thanks @qdrj, #995)
### Migration Guide
There is an extensive [Migration Guide](https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md) available for those converting from Phaser 1.x to 2.x. In the guide we detail the API breaking changes and approach to our new physics system.

View file

@ -643,7 +643,11 @@ Phaser.Game.prototype = {
this.pendingStep = true;
}
this.debug.preUpdate();
if (this.config['enableDebug'])
{
this.debug.preUpdate();
}
this.physics.preUpdate();
this.state.preUpdate();
this.plugins.preUpdate();
@ -664,8 +668,11 @@ Phaser.Game.prototype = {
else
{
this.state.pauseUpdate();
// this.input.update();
this.debug.preUpdate();
if (this.config['enableDebug'])
{
this.debug.preUpdate();
}
}
if (this.renderType != Phaser.HEADLESS)