帧动画重置
This commit is contained in:
parent
5cb5eb63eb
commit
9c574fc486
@ -963,6 +963,7 @@ action
|
||||
| addPop_s
|
||||
| setq_s
|
||||
| setcgs_s
|
||||
| animationDrawable_s
|
||||
| over_s
|
||||
| overlist_s
|
||||
| cgtextList_s
|
||||
@ -1072,6 +1073,97 @@ if (block.isCollapsed() || !block.isEnabled() || pos || Int_0 || Bool_0) {
|
||||
return code+',\n';
|
||||
*/;
|
||||
|
||||
|
||||
animationDrawable_s
|
||||
: '帧动画' '总显示帧数' IntString '底色' ColorString? Colour '底色不透明度' IntString? BGNL?Newline
|
||||
'图片序列(同一帧后面覆盖先前的,默认起始帧为0,结束帧为最后一帧)'BGNL?Newline
|
||||
'(剪裁区域不填写为全图,绘制区域不填写为全画面)'BGNL?Newline
|
||||
'(不透明度100为不透明,默认为不透明,结束不透明度默认与开始透明度相同)'BGNL?Newline
|
||||
animationDrawableimage+? Newline
|
||||
'音频序列(到达对应帧进行播放)'BGNL?Newline
|
||||
animationDrawablesound+? Newline
|
||||
|
||||
|
||||
/* animationDrawable_s
|
||||
tooltip : animationDrawable:帧动画图片叠加
|
||||
helpUrl : /_docs/#/instruction
|
||||
default : [30,"0, 0, 0",'rgb(0, 0, 0)',""]
|
||||
allImages : ['EvalString_0']
|
||||
colour : this.imageColor
|
||||
if (IntString_1&&(IntString_1 < 0||IntString_1>100)) throw new Error('透明度范围为0-100,0为透明,100为不透明,不填默认为不透明')
|
||||
|
||||
ColorString_0 = ColorString_0 ? (', "color": ['+ColorString_0+']') : '';
|
||||
IntString_1 = IntString_1 ? (', "globalAlpha": '+IntString_1+'') : '';
|
||||
var imageList=animationDrawableimage_0?',"imageList": [\n'+animationDrawableimage_0.slice(0,-1)+'\n]':''
|
||||
var soundList=animationDrawablesound_0?',"soundList": [\n'+animationDrawablesound_0.slice(0,-1)+'\n]':''
|
||||
var code = '{"type": "animationDrawable", "allFarme": '+IntString_0+ColorString_0+IntString_1+imageList+soundList+'},\n';
|
||||
return code;
|
||||
*/;
|
||||
|
||||
animationDrawableList
|
||||
: animationDrawableimage
|
||||
| animationDrawablesound
|
||||
| animationDrawabletextEmpty;
|
||||
|
||||
animationDrawableimage
|
||||
: '图片' EvalString? '起始帧' IntString? '起始不透明度' IntString? BGNL? Newline
|
||||
'剪裁坐标cx' IntString? 'cy' IntString? '宽' IntString? '高' IntString? '绘制坐标x'IntString? 'y' IntString? '宽' IntString? '高' IntString? BGNL? Newline
|
||||
'结束帧' IntString? '结束不透明度' IntString? '剪裁坐标cx' IntString? 'cy' IntString? '宽' IntString? '高' IntString? '绘制坐标x'IntString? 'y' IntString? '宽' IntString? '高' IntString? Newline
|
||||
/* animationDrawableimage
|
||||
tooltip : 帧动画图片列表
|
||||
helpUrl : /_docs/#/instruction
|
||||
default : ["","","","","","","","","","","","","","","","","","","","",""]
|
||||
colour : this.subColor
|
||||
allImages : ['EvalString_0']
|
||||
if (IntString_1&&(IntString_1 < 0||IntString_1>100)) throw new Error('不透明度范围为0-100,0为透明,100为不透明,不填默认为不透明')
|
||||
if (IntString_11&&(IntString_11 < 0||IntString_11>100)) throw new Error('不透明度范围为0-100,0为透明,100为不透明,不填默认为不透明')
|
||||
IntString_0 = IntString_0 ? (', "beforefarme": '+IntString_0+'') : '';
|
||||
IntString_1 = IntString_1 ? (', "globalAlpha": '+IntString_1+'') : '';
|
||||
IntString_2 = IntString_2 ? (', "cx": '+IntString_2+'') : '';
|
||||
IntString_3 = IntString_3 ? (', "cy": '+IntString_3+'') : '';
|
||||
IntString_4 = IntString_4 ? (', "cw": '+IntString_4+'') : '';
|
||||
IntString_5 = IntString_5 ? (', "ch": '+IntString_5+'') : '';
|
||||
IntString_6 = IntString_6 ? (', "x": '+IntString_6+'') : '';
|
||||
IntString_7 = IntString_7 ? (', "y": '+IntString_7+'') : '';
|
||||
IntString_8 = IntString_8 ? (', "w": '+IntString_8+'') : '';
|
||||
IntString_9 = IntString_9 ? (', "h": '+IntString_9+'') : '';
|
||||
|
||||
IntString_10 = IntString_10 ? (', "afterfarme": '+IntString_10+'') : '';
|
||||
IntString_11 = IntString_11 ? (', "aglobalAlpha": '+IntString_11+'') : '';
|
||||
IntString_12 = IntString_12 ? (', "acx": '+IntString_12+'') : '';
|
||||
IntString_13 = IntString_13 ? (', "acy": '+IntString_13+'') : '';
|
||||
IntString_14 = IntString_14 ? (', "acw": '+IntString_14+'') : '';
|
||||
IntString_15 = IntString_15 ? (', "ach": '+IntString_15+'') : '';
|
||||
IntString_16 = IntString_16 ? (', "ax": '+IntString_16+'') : '';
|
||||
IntString_17 = IntString_17 ? (', "ay": '+IntString_17+'') : '';
|
||||
IntString_18 = IntString_18 ? (', "aw": '+IntString_18+'') : '';
|
||||
IntString_19 = IntString_19 ? (', "ah": '+IntString_19+'') : '';
|
||||
|
||||
return '{ "image":"'+EvalString_0+'"'+IntString_0+IntString_1+IntString_2+IntString_3+IntString_4+IntString_5+IntString_6+IntString_7+IntString_8+IntString_9+IntString_10+IntString_11+IntString_12+IntString_13+IntString_14+IntString_15+IntString_16+IntString_17+IntString_18+IntString_19+'},'
|
||||
*/;
|
||||
|
||||
animationDrawablesound
|
||||
: '音效' EvalString? '起始帧' IntString '是否停止其他音效'Bool? Newline
|
||||
|
||||
/* animationDrawablesound
|
||||
tooltip : 帧动画配音
|
||||
helpUrl : /_docs/#/instruction
|
||||
default : ["",0,false]
|
||||
colour : this.subColor
|
||||
allSounds : ['EvalString_0']
|
||||
|
||||
return '{ "sound":"'+EvalString_0+'","startfarme":'+IntString_0+',"stopbefore":'+Bool_0+'},'
|
||||
*/;
|
||||
|
||||
animationDrawabletextEmpty
|
||||
: Newline
|
||||
|
||||
/* animationDrawabletextEmpty
|
||||
var code = [];
|
||||
return code;
|
||||
*/;
|
||||
|
||||
|
||||
over_s
|
||||
: '旁白文字' ':' EvalString BGNL? Newline
|
||||
'背景' EvalString? '回忆滤镜' Bool? '持续帧数' Int? '渐入渐出帧数' Int? '音频文件' EvalString? BGNL? Newline
|
||||
@ -2001,10 +2093,10 @@ drawWarning_s
|
||||
/* drawWarning_s
|
||||
tooltip : drawWarning: 绘制warning警告并拉进镜头,本事件为异步事件,下一事件将在3100ms后执行
|
||||
helpUrl : /_docs/#/instruction
|
||||
default : [0, 0,'2',24,"这里是提示内容","绿色史莱姆",false]
|
||||
default : [0, 0,2,24,"这里是提示内容","绿色史莱姆",false]
|
||||
colour : this.soundColor
|
||||
selectPoint : ["PosString_0", "PosString_1"]
|
||||
if(!EvalString_1||!/^(0|([1-9][0-9]*))(\.[\d]+)?$/.test(EvalString_1))throw new Error("此项仅能填写小数或整数");
|
||||
if(!EvalString_1||!/^(0|([1-9][0-9]*))(\.[\d]+)?$/.test(EvalString_0))throw new Error("此项仅能填写小数或整数");
|
||||
var code = '{"type": "drawWarning", "x": '+PosString_0+', "y": '+PosString_1+',"large":'+EvalString_0+',"size":'+Int_0+',"text": "'+EvalString_1+'", "text2": "'+EvalString_2+'", "warning": '+Bool_0+'},\n';
|
||||
return code;
|
||||
*/;
|
||||
|
@ -1017,6 +1017,62 @@ MotaActionParser = function () {
|
||||
]);
|
||||
}
|
||||
break;
|
||||
case "animationDrawable":
|
||||
var buildanimationDrawableimage = function (obj) {
|
||||
obj = MotaActionFunctions.processanimationDrawableimage(obj || []);
|
||||
var res = null;
|
||||
for (var ii = obj.length - 1, one; (one = obj[ii]); ii--) {
|
||||
res = MotaActionBlocks["animationDrawableimage"].xmlText([
|
||||
one[0],
|
||||
one[1],
|
||||
one[2],
|
||||
one[3],
|
||||
one[4],
|
||||
one[5],
|
||||
one[6],
|
||||
one[7],
|
||||
one[8],
|
||||
one[9],
|
||||
one[10],
|
||||
one[11],
|
||||
one[12],
|
||||
one[13],
|
||||
one[14],
|
||||
one[15],
|
||||
one[16],
|
||||
one[17],
|
||||
one[18],
|
||||
one[19],
|
||||
one[20],
|
||||
res,
|
||||
]);
|
||||
}
|
||||
return res;
|
||||
};
|
||||
var buildanimationDrawablesound = function (obj) {
|
||||
obj = MotaActionFunctions.processanimationDrawablesound(obj || []);
|
||||
var res = null;
|
||||
for (var ii = obj.length - 1, one; (one = obj[ii]); ii--) {
|
||||
res = MotaActionBlocks["animationDrawablesound"].xmlText([
|
||||
one[0],
|
||||
one[1],
|
||||
one[2],
|
||||
res,
|
||||
]);
|
||||
}
|
||||
return res;
|
||||
};
|
||||
this.next = MotaActionBlocks["animationDrawable_s"].xmlText([
|
||||
data.allFarme,
|
||||
data.color,
|
||||
"rgba(" + data.color + ")",
|
||||
data.globalAlpha,
|
||||
buildanimationDrawableimage(data.imageList),
|
||||
buildanimationDrawablesound(data.soundList),
|
||||
this.next,
|
||||
]);
|
||||
break;
|
||||
|
||||
case "jumpHero": // 跳跃勇士
|
||||
if (data.dxy) {
|
||||
this.next = MotaActionBlocks["jumpHero_1_s"].xmlText([
|
||||
@ -3104,6 +3160,43 @@ MotaActionParser = function () {
|
||||
return str;
|
||||
};
|
||||
|
||||
MotaActionFunctions.processanimationDrawableimage = function (overList) {
|
||||
var list = [];
|
||||
overList.forEach(function (one) {
|
||||
list.push([
|
||||
one.image,
|
||||
one.beforefarme,
|
||||
one.globalAlpha,
|
||||
one.cx,
|
||||
one.cy,
|
||||
one.cw,
|
||||
one.ch,
|
||||
one.x,
|
||||
one.y,
|
||||
one.w,
|
||||
one.h,
|
||||
one.afterfarme,
|
||||
one.aglobalAlpha,
|
||||
one.acx,
|
||||
one.acy,
|
||||
one.acw,
|
||||
one.ach,
|
||||
one.ax,
|
||||
one.ay,
|
||||
one.aw,
|
||||
one.ah,
|
||||
]);
|
||||
});
|
||||
return list;
|
||||
};
|
||||
MotaActionFunctions.processanimationDrawablesound = function (overList) {
|
||||
var list = [];
|
||||
overList.forEach(function (one) {
|
||||
list.push([one.sound, one.startfarme, one.stopbefore]);
|
||||
});
|
||||
return list;
|
||||
};
|
||||
|
||||
MotaActionFunctions.replaceFromName = function (str) {
|
||||
if (!str || MotaActionFunctions.disableReplace) return str;
|
||||
var map = {},
|
||||
|
@ -284,6 +284,29 @@ main.floors.jiaocheng02=
|
||||
"type": "hide",
|
||||
"remove": true
|
||||
}
|
||||
],
|
||||
"3,8": [
|
||||
{
|
||||
"type": "animationDrawable",
|
||||
"allFarme": 30,
|
||||
"color": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"imageList": [
|
||||
{
|
||||
"image": ""
|
||||
}
|
||||
],
|
||||
"soundList": [
|
||||
{
|
||||
"sound": "",
|
||||
"startfarme": 0,
|
||||
"stopbefore": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"changeFloor": {
|
||||
|
1020
project/plugins.js
1020
project/plugins.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user