setVolume SE
This commit is contained in:
parent
3f44807a06
commit
b82f92196c
@ -1312,7 +1312,7 @@ async可选,如果为true则会异步执行(即不等待当前事件执行
|
|||||||
|
|
||||||
使用方法: `{"type": "setVolume", "value": 90, "time": 500, "async": true}`
|
使用方法: `{"type": "setVolume", "value": 90, "time": 500, "async": true}`
|
||||||
|
|
||||||
value为音量大小,在0到100之间,默认为100。设置后,BGM和SE都将使用该音量进行播放。
|
value为音量大小,在0到100之间,默认为100。设置后,BGM将使用该音量进行播放。SE的音量大小不会发生改变。
|
||||||
|
|
||||||
可以设置time为音量渐变时间。
|
可以设置time为音量渐变时间。
|
||||||
|
|
||||||
|
|||||||
@ -1804,7 +1804,7 @@ events.prototype.setVolume = function (value, time, callback) {
|
|||||||
if (core.isset(core.musicStatus.playingBgm)) {
|
if (core.isset(core.musicStatus.playingBgm)) {
|
||||||
core.material.bgms[core.musicStatus.playingBgm].volume = value;
|
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) {
|
if (!core.isset(time) || time<100) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user