setVolume SE

This commit is contained in:
oc 2019-02-02 17:01:51 +08:00
parent 3f44807a06
commit b82f92196c
2 changed files with 2 additions and 2 deletions

View File

@ -1312,7 +1312,7 @@ async可选如果为true则会异步执行即不等待当前事件执行
使用方法: `{"type": "setVolume", "value": 90, "time": 500, "async": true}`
value为音量大小在0到100之间默认为100。设置后BGM和SE都将使用该音量进行播放。
value为音量大小在0到100之间默认为100。设置后BGM将使用该音量进行播放。SE的音量大小不会发生改变。
可以设置time为音量渐变时间。

View File

@ -1804,7 +1804,7 @@ events.prototype.setVolume = function (value, time, callback) {
if (core.isset(core.musicStatus.playingBgm)) {
core.material.bgms[core.musicStatus.playingBgm].volume = value;
}
core.musicStatus.gainNode.gain.value = value;
// core.musicStatus.gainNode.gain.value = value;
}
if (!core.isset(time) || time<100) {