reimplement the editor use lastest antd and other libs, feature of this commit:
1. file manger 2. highlight for click input or output 3. selector of subtress 4. autocomplete for input or output
This commit is contained in:
1 parent
91da6f0071
commit
2e5c08b2ad
84 files changed
+14250
-11038
No files matched your search
@@ -0,0 +1,236 @@
|
||||
[
|
||||
{
|
||||
"name": "AlwaysFail",
|
||||
"type": "Decorator",
|
||||
"doc": "+ 只能有一个子节点,多个仅执行第一个\n+ 不管子节点是否成功都返回失败\n",
|
||||
"desc": "始终返回失败"
|
||||
},
|
||||
{
|
||||
"name": "AlwaysSuccess",
|
||||
"type": "Decorator",
|
||||
"doc": "+ 只能有一个子节点,多个仅执行第一个\n+ 不管子节点是否成功都返回成功\n",
|
||||
"desc": "始终返回成功"
|
||||
},
|
||||
{
|
||||
"name": "Attack",
|
||||
"type": "Action",
|
||||
"input": [
|
||||
"{目标}"
|
||||
],
|
||||
"desc": "攻击"
|
||||
},
|
||||
{
|
||||
"name": "Cmp",
|
||||
"type": "Condition",
|
||||
"doc": "+ 若值为空,返回失败\n+ 非整数类型可能会报错\n",
|
||||
"input": [
|
||||
"值(int)"
|
||||
],
|
||||
"args": [
|
||||
{
|
||||
"name": "value",
|
||||
"desc": "值",
|
||||
"type": "code?"
|
||||
},
|
||||
{
|
||||
"name": "gt",
|
||||
"desc": ">",
|
||||
"type": "int?"
|
||||
},
|
||||
{
|
||||
"name": "ge",
|
||||
"desc": ">=",
|
||||
"type": "int?"
|
||||
},
|
||||
{
|
||||
"name": "eq",
|
||||
"desc": "==",
|
||||
"type": "int?"
|
||||
},
|
||||
{
|
||||
"name": "le",
|
||||
"desc": "<=",
|
||||
"type": "int?"
|
||||
},
|
||||
{
|
||||
"name": "lt",
|
||||
"desc": "<",
|
||||
"type": "int?"
|
||||
}
|
||||
],
|
||||
"desc": "比较值大小"
|
||||
},
|
||||
{
|
||||
"name": "FindEnemy",
|
||||
"output": [
|
||||
"目标单位"
|
||||
],
|
||||
"type": "Condition",
|
||||
"doc": "+ 没找到返回失败\n",
|
||||
"args": [
|
||||
{
|
||||
"name": "x",
|
||||
"desc": "x",
|
||||
"type": "int?"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"desc": "y",
|
||||
"type": "int?"
|
||||
},
|
||||
{
|
||||
"name": "w",
|
||||
"desc": "宽",
|
||||
"type": "int?"
|
||||
},
|
||||
{
|
||||
"name": "h",
|
||||
"desc": "高",
|
||||
"type": "int?"
|
||||
},
|
||||
{
|
||||
"name": "count",
|
||||
"desc": "查找上限",
|
||||
"type": "string?"
|
||||
}
|
||||
],
|
||||
"desc": "查找敌人"
|
||||
},
|
||||
{
|
||||
"name": "GetHp",
|
||||
"output": [
|
||||
"生命值"
|
||||
],
|
||||
"type": "Action",
|
||||
"desc": "获取生命值"
|
||||
},
|
||||
{
|
||||
"name": "Idle",
|
||||
"type": "Action",
|
||||
"desc": "待机"
|
||||
},
|
||||
{
|
||||
"name": "Log",
|
||||
"type": "Action",
|
||||
"args": [
|
||||
{
|
||||
"name": "str",
|
||||
"desc": "日志",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"desc": "打印日志"
|
||||
},
|
||||
{
|
||||
"name": "MoveToPos",
|
||||
"type": "Action",
|
||||
"args": [
|
||||
{
|
||||
"name": "x",
|
||||
"desc": "x",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"desc": "y",
|
||||
"type": "int"
|
||||
}
|
||||
],
|
||||
"desc": "移动到坐标"
|
||||
},
|
||||
{
|
||||
"name": "MoveToTarget",
|
||||
"type": "Action",
|
||||
"input": [
|
||||
"{目标}"
|
||||
],
|
||||
"desc": "移动到目标"
|
||||
},
|
||||
{
|
||||
"name": "Not",
|
||||
"type": "Decorator",
|
||||
"doc": "+ 将子节点的返回值取反\n",
|
||||
"desc": "取反"
|
||||
},
|
||||
{
|
||||
"name": "Parallel",
|
||||
"type": "Composite",
|
||||
"doc": "执行所有子节点并返回成功\n",
|
||||
"desc": "并行执行"
|
||||
},
|
||||
{
|
||||
"name": "Selector",
|
||||
"type": "Composite",
|
||||
"doc": "+ 一直往下执行,有子节点返回成功则返回成功,若全部节点返回失败则返回失败\n+ 子节点是或的关系\n",
|
||||
"desc": "选择执行"
|
||||
},
|
||||
{
|
||||
"name": "Sequence",
|
||||
"type": "Composite",
|
||||
"doc": "+ 一直往下执行,有子节点返回成功则返回成功,若全部节点返回失败则返回失败\n+ 子节点是或的关系\n",
|
||||
"desc": "顺序执行"
|
||||
},
|
||||
{
|
||||
"name": "Wait",
|
||||
"type": "Action",
|
||||
"args": [
|
||||
{
|
||||
"name": "time",
|
||||
"desc": "时间/tick",
|
||||
"type": "int"
|
||||
}
|
||||
],
|
||||
"desc": "等待"
|
||||
},
|
||||
{
|
||||
"name": "TestB3",
|
||||
"type": "Action",
|
||||
"args": [
|
||||
{
|
||||
"name": "time",
|
||||
"desc": "时间",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "random",
|
||||
"desc": "随机",
|
||||
"type": "float?"
|
||||
},
|
||||
{
|
||||
"name": "open",
|
||||
"desc": "打开来",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "check",
|
||||
"desc": "检查",
|
||||
"type": "code"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"desc": "检查",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"desc": "状态",
|
||||
"type": "enum",
|
||||
"options": [
|
||||
{
|
||||
"name": "成功",
|
||||
"value": "SUCCESS"
|
||||
},
|
||||
{
|
||||
"name": "失败",
|
||||
"value": "FAILURE"
|
||||
},
|
||||
{
|
||||
"name": "运行中",
|
||||
"value": "RUNNING"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"desc": "等待"
|
||||
}
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
[{"name":"AlwaysFail","type":"Decorator","doc":"+ 只能有一个子节点,多个仅执行第一个\n+ 不管子节点是否成功都返回失败\n","desc":"始终返回失败"},{"name":"AlwaysSuccess","type":"Decorator","doc":"+ 只能有一个子节点,多个仅执行第一个\n+ 不管子节点是否成功都返回成功\n","desc":"始终返回成功"},{"name":"Attack","type":"Action","input":["{目标}"],"desc":"攻击"},{"name":"Cmp","type":"Condition","doc":"+ 若值为空,返回失败\n+ 非整数类型可能会报错\n","input":["值(int)"],"args":[{"name":"value","desc":"值","type":"code?"},{"name":"gt","desc":">","type":"int?"},{"name":"ge","desc":">=","type":"int?"},{"name":"eq","desc":"==","type":"int?"},{"name":"le","desc":"<=","type":"int?"},{"name":"lt","desc":"<","type":"int?"}],"desc":"比较值大小"},{"name":"FindEnemy","output":["目标单位"],"type":"Condition","doc":"+ 没找到返回失败\n","args":[{"name":"x","desc":"x","type":"int?"},{"name":"y","desc":"y","type":"int?"},{"name":"w","desc":"宽","type":"int?"},{"name":"h","desc":"高","type":"int?"},{"name":"count","desc":"查找上限","type":"string?"}],"desc":"查找敌人"},{"name":"GetHp","output":["生命值"],"type":"Action","desc":"获取生命值"},{"name":"Idle","type":"Action","desc":"待机"},{"name":"Log","type":"Action","args":[{"name":"str","desc":"日志","type":"string"}],"desc":"打印日志"},{"name":"MoveToPos","type":"Action","args":[{"name":"x","desc":"x","type":"int"},{"name":"y","desc":"y","type":"int"}],"desc":"移动到坐标"},{"name":"MoveToTarget","type":"Action","input":["{目标}"],"desc":"移动到目标"},{"name":"Not","type":"Decorator","doc":"+ 将子节点的返回值取反\n","desc":"取反"},{"name":"Parallel","type":"Composite","doc":"执行所有子节点并返回成功\n","desc":"并行执行"},{"name":"Selector","type":"Composite","doc":"+ 一直往下执行,有子节点返回成功则返回成功,若全部节点返回失败则返回失败\n+ 子节点是或的关系\n","desc":"选择执行"},{"name":"Sequence","type":"Composite","doc":"+ 一直往下执行,有子节点返回成功则返回成功,若全部节点返回失败则返回失败\n+ 子节点是或的关系\n","desc":"顺序执行"},{"name":"Wait","type":"Action","args":[{"name":"time","desc":"时间/tick","type":"int"}],"desc":"等待"}]
|
||||
@@ -24,13 +24,12 @@
|
||||
"id": 4,
|
||||
"name": "Sequence",
|
||||
"desc": "新建行为树",
|
||||
"args": {},
|
||||
"path": "subtree2.json"
|
||||
"path": "workdir/subtree2.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"id": 7,
|
||||
"name": "Cmp",
|
||||
"args": {
|
||||
"gt": 50,
|
||||
@@ -41,24 +40,23 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Log",
|
||||
"id": 8,
|
||||
"name": "TestB3",
|
||||
"desc": "攻击",
|
||||
"args": {
|
||||
"str": "Attack!"
|
||||
},
|
||||
"children": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"id": 9,
|
||||
"name": "Sequence",
|
||||
"desc": "新建行为树",
|
||||
"path": "subtree1.json"
|
||||
"path": "workdir/subtree1.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"id": 12,
|
||||
"name": "Log",
|
||||
"desc": "逃跑",
|
||||
"args": {
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "subtree1",
|
||||
"root": {
|
||||
"id": 1,
|
||||
"name": "Sequence",
|
||||
"desc": "新建行为树",
|
||||
"children": [
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Log",
|
||||
"args": {
|
||||
"str": "hello"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Wait",
|
||||
"args": {
|
||||
"time": 1
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"id": 4,
|
||||
"name": "unknow"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"desc": "子树1"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "subtree2",
|
||||
"root": {
|
||||
"id": 1,
|
||||
"name": "Sequence",
|
||||
"desc": "新建行为树",
|
||||
"children": [
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Cmp",
|
||||
"args": {},
|
||||
"input": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Attack",
|
||||
"input": [
|
||||
"in"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"desc": "子树2"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "subtree",
|
||||
"name": "subtree1",
|
||||
"root": {
|
||||
"id": 1,
|
||||
"name": "Sequence",
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user