pauseBgm
This commit is contained in:
parent
e317259f42
commit
fb8145a9f4
@ -145,7 +145,7 @@ editor_blockly = function () {
|
||||
MotaActionBlocks['screenFlash_s'].xmlText(),
|
||||
MotaActionBlocks['setWeather_s'].xmlText(),
|
||||
MotaActionBlocks['playBgm_s'].xmlText(),
|
||||
// MotaActionBlocks['pauseBgm_s'].xmlText(),
|
||||
MotaActionBlocks['pauseBgm_s'].xmlText(),
|
||||
// MotaActionBlocks['resumeBgm_s'].xmlText(),
|
||||
MotaActionBlocks['loadBgm_s'].xmlText(),
|
||||
MotaActionBlocks['freeBgm_s'].xmlText(),
|
||||
|
||||
@ -1273,15 +1273,13 @@ async可选,如果为true则会异步执行(即不等待当前事件执行
|
||||
### pauseBgm:暂停背景音乐
|
||||
|
||||
使用`{"type": "pauseBgm"}`可以暂停背景音乐的播放。
|
||||
|
||||
**从V2.5.4开始不再支持此事件,请通过设置音量来达到此效果。**
|
||||
|
||||
<!--
|
||||
### resumeBgm:恢复背景音乐
|
||||
|
||||
使用`{"type": "resumeBgm"}`可以恢复背景音乐的播放。
|
||||
|
||||
**从V2.5.4开始不再支持此事件,请通过设置音量来达到此效果。**
|
||||
|
||||
-->
|
||||
### loadBgm:预加载一个背景音乐
|
||||
|
||||
使用loadBgm可以预加载一个背景音乐。
|
||||
|
||||
@ -2608,6 +2608,7 @@ control.prototype.pauseBgm = function () {
|
||||
try {
|
||||
if (core.isset(core.musicStatus.playingBgm)) {
|
||||
core.material.bgms[core.musicStatus.playingBgm].pause();
|
||||
core.musicStatus.playingBgm = null;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
@ -2615,7 +2616,6 @@ control.prototype.pauseBgm = function () {
|
||||
main.log(e);
|
||||
}
|
||||
this.setMusicBtn();
|
||||
|
||||
}
|
||||
|
||||
////// 恢复背景音乐的播放 //////
|
||||
|
||||
@ -928,11 +928,11 @@ events.prototype.doAction = function() {
|
||||
core.playBgm(data.name);
|
||||
this.doAction();
|
||||
break;
|
||||
/*
|
||||
case "pauseBgm":
|
||||
core.pauseBgm();
|
||||
this.doAction();
|
||||
break
|
||||
/*
|
||||
case "resumeBgm":
|
||||
core.resumeBgm();
|
||||
this.doAction();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user