Event: Comment
This commit is contained in:
parent
1e7da99ff1
commit
755919307d
@ -182,6 +182,7 @@ return code;
|
|||||||
action
|
action
|
||||||
: text_0_s
|
: text_0_s
|
||||||
| text_1_s
|
| text_1_s
|
||||||
|
| comment_s
|
||||||
| autoText_s
|
| autoText_s
|
||||||
| setText_s
|
| setText_s
|
||||||
| tip_s
|
| tip_s
|
||||||
@ -282,6 +283,19 @@ var code = '"'+title+EvalString_1+EvalString_2+'",\n';
|
|||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
|
comment_s
|
||||||
|
: '添加注释' ':' EvalString Newline
|
||||||
|
|
||||||
|
|
||||||
|
/* comment_s
|
||||||
|
tooltip : text:显示一段文字(剧情)
|
||||||
|
helpUrl : https://ckcz123.github.io/mota-js/#/event?id=comment%ef%bc%9a%e6%b7%bb%e5%8a%a0%e6%b3%a8%e9%87%8a
|
||||||
|
default : ["可以在这里写添加任何注释内容"]
|
||||||
|
colour : this.commentColor
|
||||||
|
var code = '{"type": "comment", "text": "'+EvalString_0+'"},\n';
|
||||||
|
return code;
|
||||||
|
*/;
|
||||||
|
|
||||||
autoText_s
|
autoText_s
|
||||||
: '自动剧情文本: 标题' EvalString? '图像' IdString? '对话框效果' EvalString? '时间' Int BGNL? EvalString Newline
|
: '自动剧情文本: 标题' EvalString? '图像' IdString? '对话框效果' EvalString? '时间' Int BGNL? EvalString Newline
|
||||||
|
|
||||||
@ -1575,6 +1589,7 @@ this.evisitor.printColor=70;
|
|||||||
this.evisitor.dataColor=130;
|
this.evisitor.dataColor=130;
|
||||||
this.evisitor.eventColor=220;
|
this.evisitor.eventColor=220;
|
||||||
this.evisitor.soundColor=20;
|
this.evisitor.soundColor=20;
|
||||||
|
this.evisitor.commentColor=285;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Function_1
|
/* Function_1
|
||||||
@ -1704,6 +1719,9 @@ ActionParser.prototype.parseAction = function() {
|
|||||||
this.next = MotaActionBlocks['autoText_s'].xmlText([
|
this.next = MotaActionBlocks['autoText_s'].xmlText([
|
||||||
'','','',data.time,this.EvalString(data.text),this.next]);
|
'','','',data.time,this.EvalString(data.text),this.next]);
|
||||||
break;
|
break;
|
||||||
|
case "comment": // 注释
|
||||||
|
this.next = MotaActionBlocks['comment_s'].xmlText([data.text,this.next]);
|
||||||
|
break;
|
||||||
case "setText": // 设置剧情文本的属性
|
case "setText": // 设置剧情文本的属性
|
||||||
var setTextfunc = function(a){return a?JSON.stringify(a).slice(1,-1):null;}
|
var setTextfunc = function(a){return a?JSON.stringify(a).slice(1,-1):null;}
|
||||||
data.title=setTextfunc(data.title);
|
data.title=setTextfunc(data.title);
|
||||||
|
|||||||
@ -56,6 +56,7 @@ editor_blockly = function () {
|
|||||||
'显示文字':[
|
'显示文字':[
|
||||||
MotaActionBlocks['text_0_s'].xmlText(),
|
MotaActionBlocks['text_0_s'].xmlText(),
|
||||||
MotaActionBlocks['text_1_s'].xmlText(),
|
MotaActionBlocks['text_1_s'].xmlText(),
|
||||||
|
MotaActionBlocks['comment_s'].xmlText(),
|
||||||
MotaActionFunctions.actionParser.parseList({"type": "choices", "text": "是否跳过剧情", "choices": [
|
MotaActionFunctions.actionParser.parseList({"type": "choices", "text": "是否跳过剧情", "choices": [
|
||||||
{"text": "是", "action": []},
|
{"text": "是", "action": []},
|
||||||
{"text": "否", "action": [
|
{"text": "否", "action": [
|
||||||
|
|||||||
@ -327,6 +327,18 @@ time为可选项,表示文字添加的速度。若此项设置为0将直接全
|
|||||||
|
|
||||||
值得注意的是,提示的text内容也是可以使用`${ }`来计算表达式的值的。
|
值得注意的是,提示的text内容也是可以使用`${ }`来计算表达式的值的。
|
||||||
|
|
||||||
|
### comment:添加注释
|
||||||
|
|
||||||
|
使用`{"type": "comment"}`可以添加一段注释
|
||||||
|
|
||||||
|
``` js
|
||||||
|
"x,y": [ // 实际执行的事件列表
|
||||||
|
{"type": "comment", "text": "这是一段会被跳过的注释内容"}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
这个事件将在运行时被游戏跳过。
|
||||||
|
|
||||||
### setValue:设置勇士的某个属性、道具个数,或某个变量/Flag的值
|
### setValue:设置勇士的某个属性、道具个数,或某个变量/Flag的值
|
||||||
|
|
||||||
`{"type": "setValue"}` 能修改勇士的某个属性、道具个数、或某个自定义变量或`Flag`的值。
|
`{"type": "setValue"}` 能修改勇士的某个属性、道具个数、或某个自定义变量或`Flag`的值。
|
||||||
|
|||||||
@ -392,6 +392,9 @@ events.prototype.doAction = function() {
|
|||||||
}, data.time || 3000);
|
}, data.time || 3000);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "comment":
|
||||||
|
this.doAction();
|
||||||
|
break;
|
||||||
case "setText": // 设置文本状态
|
case "setText": // 设置文本状态
|
||||||
["position", "offset", "bold", "titlefont", "textfont", "time"].forEach(function (t) {
|
["position", "offset", "bold", "titlefont", "textfont", "time"].forEach(function (t) {
|
||||||
if (core.isset(data[t])) core.status.textAttribute[t]=data[t];
|
if (core.isset(data[t])) core.status.textAttribute[t]=data[t];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user