mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
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:
parent
369e2cc2d0
commit
9aa10f7521
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue