argument with options treat as enum
This commit is contained in:
1 parent
49bfc76fc6
commit
767d8aba95
14 files changed
+105
-133
No files matched your search
@@ -66,7 +66,7 @@
|
||||
"args": [
|
||||
{
|
||||
"name": "builtin",
|
||||
"type": "enum",
|
||||
"type": "string",
|
||||
"desc": "事件",
|
||||
"options": [
|
||||
{
|
||||
@@ -332,7 +332,10 @@
|
||||
},
|
||||
{
|
||||
"name": "MoveToPos",
|
||||
"type": "Action (Client)",
|
||||
"type": "Action",
|
||||
"group": [
|
||||
"Client"
|
||||
],
|
||||
"args": [
|
||||
{
|
||||
"name": "x",
|
||||
@@ -349,7 +352,10 @@
|
||||
},
|
||||
{
|
||||
"name": "MoveToTarget",
|
||||
"type": "Action (Server)",
|
||||
"type": "Action",
|
||||
"group": [
|
||||
"Server"
|
||||
],
|
||||
"input": [
|
||||
"{目标}"
|
||||
],
|
||||
@@ -357,7 +363,12 @@
|
||||
},
|
||||
{
|
||||
"name": "TestB3",
|
||||
"type": "Action (Client|Server|Test)",
|
||||
"type": "Action",
|
||||
"group": [
|
||||
"Client",
|
||||
"Server",
|
||||
"Test"
|
||||
],
|
||||
"args": [
|
||||
{
|
||||
"name": "time",
|
||||
@@ -387,7 +398,7 @@
|
||||
{
|
||||
"name": "status",
|
||||
"desc": "状态",
|
||||
"type": "enum",
|
||||
"type": "string",
|
||||
"options": [
|
||||
{
|
||||
"name": "成功",
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"id": 6,
|
||||
"name": "Check",
|
||||
"args": {
|
||||
"value": "target[0].x > 0 |"
|
||||
"value": "target[0].x > 0 "
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -95,6 +95,13 @@
|
||||
"output": [
|
||||
"context"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "Listen",
|
||||
"args": {
|
||||
"builtin": "afterRunFailure"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+11
-14
@@ -1,16 +1,24 @@
|
||||
{
|
||||
"version": "1.8.0",
|
||||
"name": "hero",
|
||||
"desc": "英雄测试AI",
|
||||
"firstid": 1,
|
||||
"export": true,
|
||||
"group": [
|
||||
"Client",
|
||||
"Server"
|
||||
],
|
||||
"import": [],
|
||||
"declvar": [],
|
||||
"root": {
|
||||
"id": 1,
|
||||
"name": "Selector",
|
||||
"desc": "英雄测试AI",
|
||||
"args": {},
|
||||
"children": [
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Sequence",
|
||||
"desc": "攻击",
|
||||
"args": {},
|
||||
"children": [
|
||||
{
|
||||
"id": 3,
|
||||
@@ -28,7 +36,6 @@
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Attack",
|
||||
"args": {},
|
||||
"input": [
|
||||
"enemy"
|
||||
]
|
||||
@@ -46,7 +53,6 @@
|
||||
"id": 6,
|
||||
"name": "Sequence",
|
||||
"desc": "移动",
|
||||
"args": {},
|
||||
"children": [
|
||||
{
|
||||
"id": 7,
|
||||
@@ -64,7 +70,6 @@
|
||||
{
|
||||
"id": 8,
|
||||
"name": "MoveToTarget",
|
||||
"args": {},
|
||||
"input": [
|
||||
"enemy"
|
||||
]
|
||||
@@ -75,12 +80,10 @@
|
||||
"id": 9,
|
||||
"name": "Sequence",
|
||||
"desc": "逃跑",
|
||||
"args": {},
|
||||
"children": [
|
||||
{
|
||||
"id": 10,
|
||||
"name": "GetHp",
|
||||
"args": {},
|
||||
"output": [
|
||||
"hp"
|
||||
]
|
||||
@@ -110,11 +113,5 @@
|
||||
"name": "Idle"
|
||||
}
|
||||
]
|
||||
},
|
||||
"desc": "英雄测试AI",
|
||||
"version": "1.8.0",
|
||||
"firstid": 1,
|
||||
"group": [],
|
||||
"import": [],
|
||||
"declvar": []
|
||||
}
|
||||
}
|
||||
+22
-14
@@ -1,5 +1,14 @@
|
||||
{
|
||||
"version": "1.8.0",
|
||||
"name": "monster",
|
||||
"desc": "怪物测试AI",
|
||||
"firstid": 1,
|
||||
"export": true,
|
||||
"group": [
|
||||
"Test"
|
||||
],
|
||||
"import": [],
|
||||
"declvar": [],
|
||||
"root": {
|
||||
"id": 1,
|
||||
"name": "Sequence",
|
||||
@@ -26,26 +35,30 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"id": 6,
|
||||
"name": "Cmp",
|
||||
"args": {
|
||||
"gt": 50,
|
||||
"value": "hp"
|
||||
"value": "hp",
|
||||
"gt": 50
|
||||
},
|
||||
"input": [
|
||||
""
|
||||
"hp"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"id": 7,
|
||||
"name": "TestB3",
|
||||
"desc": "攻击",
|
||||
"args": {
|
||||
"str": "Attack!"
|
||||
"time": 1,
|
||||
"open": true,
|
||||
"check": "1",
|
||||
"name": "1",
|
||||
"status": "FAILURE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"id": 8,
|
||||
"name": "Sequence",
|
||||
"desc": "新建行为树",
|
||||
"path": "workdir/subtree1.json"
|
||||
@@ -53,7 +66,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"id": 11,
|
||||
"name": "Log",
|
||||
"desc": "逃跑",
|
||||
"args": {
|
||||
@@ -61,10 +74,5 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"desc": "怪物测试AI",
|
||||
"firstid": 1,
|
||||
"group": [],
|
||||
"import": [],
|
||||
"declvar": []
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user