转变图块带淡入淡出时间和异步效果

This commit is contained in:
ckcz123 committed 2020-05-19 14:00:57 +08:00
1 parent b45afe0ae4
commit 91e4e40fc0
5 files changed
+116 -10

No files matched your search

+5 -3
View File
@@ -848,14 +848,14 @@ return code;
*/;
setBlock_s
: '转变图块为' EvalString 'x' EvalString? ',' 'y' EvalString? '楼层' IdString? Newline
: '转变图块为' EvalString 'x' EvalString? ',' 'y' EvalString? '楼层' IdString? '动画时间' IntString? '不等待执行完毕' Bool Newline
/* setBlock_s
tooltip : setBlock:设置某个图块,忽略坐标楼层则为当前事件
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=setblock%EF%BC%9A%E8%AE%BE%E7%BD%AE%E6%9F%90%E4%B8%AA%E5%9B%BE%E5%9D%97
colour : this.mapColor
default : ["yellowDoor","","",""]
default : ["yellowDoor","","","","",false]
var floorstr = '';
if (EvalString_1 && EvalString_2) {
var pattern1 = MotaActionFunctions.pattern.id;
@@ -874,7 +874,9 @@ if (EvalString_1 && EvalString_2) {
floorstr = ', "loc": ['+EvalString_1.join(',')+']';
}
IdString_0 = IdString_0 && (', "floorId": "'+IdString_0+'"');
var code = '{"type": "setBlock", "number": "'+EvalString_0+'"'+floorstr+IdString_0+'},\n';
IntString_0 = IntString_0 && (', "time": ' + IntString_0);
Bool_0 = Bool_0 ? (', "async": true') : '';
var code = '{"type": "setBlock", "number": "'+EvalString_0+'"'+floorstr+IdString_0+IntString_0+Bool_0+'},\n';
return code;
*/;
+1 -1
View File
@@ -222,7 +222,7 @@ ActionParser.prototype.parseAction = function() {
y_str.push(t[1]);
})
this.next = MotaActionBlocks['setBlock_s'].xmlText([
data.number||0,x_str.join(','),y_str.join(','),data.floorId||'',this.next]);
data.number||0,x_str.join(','),y_str.join(','),data.floorId||'',data.time,data.async||false,this.next]);
break;
case "turnBlock": // 事件转向
data.loc=data.loc||[];