mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Dispatching event when sound volume value changes
This commit is contained in:
parent
0c70ae236e
commit
e0591df9fc
1 changed files with 1 additions and 0 deletions
|
@ -349,6 +349,7 @@ Object.defineProperty(WebAudioSound.prototype, 'volume', {
|
|||
set: function (value) {
|
||||
this.currentConfig.volume = value;
|
||||
this.volumeNode.gain.setValueAtTime(value, 0);
|
||||
this.events.dispatch(new SoundValueEvent(this, 'SOUND_VOLUME', value));
|
||||
}
|
||||
});
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue