Pausing the game will now mute audio and resuming will un-mute, unless it was muted via the game (fixes #439)

This commit is contained in:
photonstorm
2014-02-25 03:12:12 +00:00
parent 415342d986
commit cc06a62b90
4 changed files with 80 additions and 34 deletions
+2 -2
View File
@@ -736,7 +736,7 @@ Phaser.Game.prototype = {
{
this._paused = true;
this.time.gamePaused(time);
this.sound.mute = true;
this.sound.setMute();
this.onPause.dispatch(this);
}
@@ -755,7 +755,7 @@ Phaser.Game.prototype = {
this._paused = false;
this.time.gameResumed(time);
this.input.reset();
this.sound.mute = false;
this.sound.unsetMute();
this.onResume.dispatch(this);
}