Added volume event docs

This commit is contained in:
Pavle Goloskokovic 2018-01-26 15:10:10 +01:00
parent f30fb5f9ff
commit 1e423a7ff6

View file

@ -168,6 +168,11 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', {
},
set: function (value) {
this.masterVolumeNode.gain.setValueAtTime(value, 0);
/**
* @event Phaser.Sound.WebAudioSoundManager#volume
* @param {Phaser.Sound.WebAudioSoundManager} soundManager - Reference to the sound manager that emitted event.
* @param {number} value - An updated value of Phaser.Sound.WebAudioSoundManager#volume property.
*/
this.emit('volume', this, value);
}
});