setVolume

This commit is contained in:
oc committed 2018-05-05 01:54:57 +08:00
1 parent 9beec9f3ce
commit eafcfa4deb
6 files changed
+46 -2

No files matched your search

+18
View File
@@ -216,6 +216,7 @@ action
| pauseBgm_s
| resumeBgm_s
| playSound_s
| setVolume_s
| win_s
| lose_s
| if_s
@@ -834,6 +835,19 @@ var code = '{"type": "playSound", "name": "'+EvalString_0+'"},\n';
return code;
*/
setVolume_s
: '设置音量' Int Newline
;
/* setVolume_s
tooltip : setVolume: 设置音量
helpUrl : https://ckcz123.github.io/mota-js/#/event?id=setVolume-%e8%ae%be%e7%bd%ae%e9%9f%b3%e9%87%8f
default : [90]
colour : this.soundColor
var code = '{"type": "setVolume", "value": '+Int_0+'},\n';
return code;
*/
win_s
: '游戏胜利,结局' ':' EvalString? Newline
;
@@ -1452,6 +1466,10 @@ ActionParser.prototype.parseAction = function() {
this.next = MotaActionBlocks['resumeBgm_s'].xmlText([
this.next]);
break
case "setVolume":
this.next = MotaActionBlocks['setVolume_s'].xmlText([
data.value, this.next]);
break
case "setValue":
this.next = MotaActionBlocks['setValue_s'].xmlText([
MotaActionBlocks['idString_e'].xmlText([data.name]),
+1
View File
@@ -111,6 +111,7 @@ editor_blockly = function () {
MotaActionBlocks['pauseBgm_s'].xmlText(),
MotaActionBlocks['resumeBgm_s'].xmlText(),
MotaActionBlocks['playSound_s'].xmlText(),
MotaActionBlocks['setVolume_s'].xmlText(),
'<label text="其他"></label>',
MotaActionBlocks['function_s'].xmlText(),
],