Sound.pause will no longer fire a Sound.onStop signal, and the pause values are set before the onPause signal is dispatched (thanks @AnderbergE, fix #868)

This commit is contained in:
photonstorm 2014-06-05 02:55:20 +01:00
parent 369e2cc2d0
commit 9aa10f7521
2 changed files with 7 additions and 2 deletions

View file

@ -64,6 +64,7 @@ Version 2.0.6 - "Jornhill" - -in development-
* Canvas.create has deprecated the noCocoon parameter as it's no longer required. The parameter is still in the signature, but no longer used in the method.
* Time.add allows you to add an existing Phaser.Timer to the timer pool (request #864)
* Emitter.start has a new parameter: forceQuantity which will force the quantity of a flow of particles to be the given value (request #853)
* Sound.pause will no longer fire a Sound.onStop signal, and the pause values are set before the onPause signal is dispatched (thanks @AnderbergE, fix #868)
### CocoonJS Specific Updates

View file

@ -657,12 +657,12 @@ Phaser.Sound.prototype = {
if (this.isPlaying && this._sound)
{
this.stop();
this.isPlaying = false;
this.paused = true;
this.pausedPosition = this.currentTime;
this.pausedTime = this.game.time.now;
this.onPause.dispatch(this);
this.stop();
}
},
@ -762,7 +762,11 @@ Phaser.Sound.prototype = {
}
this.currentMarker = '';
this.onStop.dispatch(this, prevMarker);
if (!this.paused)
{
this.onStop.dispatch(this, prevMarker);
}
},