mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
commit
e1bc2b7bd6
1 changed files with 13 additions and 1 deletions
|
@ -290,7 +290,12 @@ Phaser.Sound = function (game, key, volume, loop, connect) {
|
|||
* @private
|
||||
*/
|
||||
this._paused = false;
|
||||
|
||||
|
||||
/**
|
||||
* @property {boolean} _onDecodedEventDispatched - Was the onDecoded event dispatched?
|
||||
* @private
|
||||
*/
|
||||
this._onDecodedEventDispatched = false;
|
||||
};
|
||||
|
||||
Phaser.Sound.prototype = {
|
||||
|
@ -357,6 +362,13 @@ Phaser.Sound.prototype = {
|
|||
* @protected
|
||||
*/
|
||||
update: function () {
|
||||
|
||||
if (this.isDecoded && !this._onDecodedEventDispatched) {
|
||||
|
||||
this.onDecoded.dispatch(this);
|
||||
this._onDecodedEventDispatched=true;
|
||||
|
||||
}
|
||||
|
||||
if (this.pendingPlayback && this.game.cache.isSoundReady(this.key))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue