This commit is contained in:
oc 2019-01-21 22:25:43 +08:00
parent e317259f42
commit fb8145a9f4
4 changed files with 5 additions and 7 deletions

View File

@ -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(),

View File

@ -1273,15 +1273,13 @@ async可选如果为true则会异步执行即不等待当前事件执行
### pauseBgm暂停背景音乐
使用`{"type": "pauseBgm"}`可以暂停背景音乐的播放。
**从V2.5.4开始不再支持此事件,请通过设置音量来达到此效果。**
<!--
### resumeBgm恢复背景音乐
使用`{"type": "resumeBgm"}`可以恢复背景音乐的播放。
**从V2.5.4开始不再支持此事件,请通过设置音量来达到此效果。**
-->
### loadBgm预加载一个背景音乐
使用loadBgm可以预加载一个背景音乐。

View File

@ -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();
}
////// 恢复背景音乐的播放 //////

View File

@ -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();