更新rts示例代码(矿工自动采矿)
This commit is contained in:
111
extensions/cocos/cocos-ecs/assets/resources/miner-ai.bt.json
Normal file
111
extensions/cocos/cocos-ecs/assets/resources/miner-ai.bt.json
Normal file
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"name": "miner-ai",
|
||||
"description": "简化版矿工AI - 挖矿存储循环",
|
||||
"blackboard": {
|
||||
"variables": [
|
||||
{
|
||||
"name": "unitType",
|
||||
"type": "string",
|
||||
"value": "miner",
|
||||
"group": "基础属性",
|
||||
"description": "单位类型"
|
||||
},
|
||||
{
|
||||
"name": "currentCommand",
|
||||
"type": "string",
|
||||
"value": "mine",
|
||||
"group": "命令状态",
|
||||
"description": "当前命令"
|
||||
},
|
||||
{
|
||||
"name": "hasOre",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"group": "工作状态",
|
||||
"description": "是否携带矿石"
|
||||
},
|
||||
{
|
||||
"name": "targetPosition",
|
||||
"type": "vector3",
|
||||
"value": null,
|
||||
"group": "移动属性",
|
||||
"description": "目标位置"
|
||||
},
|
||||
{
|
||||
"name": "hasTarget",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"group": "移动属性",
|
||||
"description": "是否有目标"
|
||||
},
|
||||
{
|
||||
"name": "isMoving",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"group": "移动属性",
|
||||
"description": "是否正在移动"
|
||||
},
|
||||
{
|
||||
"name": "currentHealth",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"group": "基础属性",
|
||||
"description": "当前生命值"
|
||||
},
|
||||
{
|
||||
"name": "maxHealth",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"group": "基础属性",
|
||||
"description": "最大生命值"
|
||||
}
|
||||
]
|
||||
},
|
||||
"root": {
|
||||
"type": "selector",
|
||||
"name": "矿工主选择器",
|
||||
"children": [
|
||||
{
|
||||
"type": "sequence",
|
||||
"name": "存储矿石序列",
|
||||
"children": [
|
||||
{
|
||||
"type": "blackboard-value-comparison",
|
||||
"name": "检查是否携带矿石",
|
||||
"variable": "hasOre",
|
||||
"operator": "==",
|
||||
"value": true
|
||||
},
|
||||
{
|
||||
"type": "execute-action",
|
||||
"name": "前往仓库存储",
|
||||
"action": "store-ore"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "sequence",
|
||||
"name": "挖矿序列",
|
||||
"children": [
|
||||
{
|
||||
"type": "blackboard-value-comparison",
|
||||
"name": "检查是否没有矿石",
|
||||
"variable": "hasOre",
|
||||
"operator": "==",
|
||||
"value": false
|
||||
},
|
||||
{
|
||||
"type": "execute-action",
|
||||
"name": "寻找并挖掘矿石",
|
||||
"action": "find-and-mine-ore"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "execute-action",
|
||||
"name": "默认待机",
|
||||
"action": "idle-behavior"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "a71fbedb-9435-4637-b7a5-e0fb8b99d3c1",
|
||||
"uuid": "7ecbbfe3-a63f-4558-89e2-85e3f084ee02",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
454
extensions/cocos/cocos-ecs/assets/resources/miner-ai.btree
Normal file
454
extensions/cocos/cocos-ecs/assets/resources/miner-ai.btree
Normal file
@@ -0,0 +1,454 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "root",
|
||||
"type": "root",
|
||||
"name": "矿工AI根节点",
|
||||
"position": {
|
||||
"x": 400,
|
||||
"y": 100
|
||||
},
|
||||
"properties": {},
|
||||
"children": [
|
||||
"main-selector"
|
||||
],
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": false,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "main-selector",
|
||||
"type": "selector",
|
||||
"name": "矿工主选择器",
|
||||
"position": {
|
||||
"x": 400,
|
||||
"y": 200
|
||||
},
|
||||
"properties": {
|
||||
"description": {
|
||||
"name": "描述",
|
||||
"type": "string",
|
||||
"value": "矿工主要行为选择:有矿石就存储,没矿石就挖矿,否则待机",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"store-conditional",
|
||||
"mine-conditional",
|
||||
"idle-action"
|
||||
],
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "store-conditional",
|
||||
"type": "conditional-decorator",
|
||||
"name": "检查是否携带矿石",
|
||||
"position": {
|
||||
"x": 200,
|
||||
"y": 250
|
||||
},
|
||||
"properties": {
|
||||
"conditionType": {
|
||||
"name": "条件类型",
|
||||
"type": "string",
|
||||
"value": "blackboardCompare",
|
||||
"description": "条件判断类型",
|
||||
"required": false
|
||||
},
|
||||
"executeWhenTrue": {
|
||||
"name": "条件为真时执行",
|
||||
"type": "boolean",
|
||||
"value": true,
|
||||
"description": "条件为真时是否执行子节点",
|
||||
"required": false
|
||||
},
|
||||
"executeWhenFalse": {
|
||||
"name": "条件为假时执行",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "条件为假时是否执行子节点",
|
||||
"required": false
|
||||
},
|
||||
"checkInterval": {
|
||||
"name": "检查间隔",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "条件检查间隔时间(秒),0表示每帧检查",
|
||||
"required": false
|
||||
},
|
||||
"abortType": {
|
||||
"name": "中止类型",
|
||||
"type": "select",
|
||||
"value": "None",
|
||||
"description": "决定节点在何种情况下会被中止",
|
||||
"options": ["None", "LowerPriority", "Self", "Both"],
|
||||
"required": false
|
||||
},
|
||||
"shouldReevaluate": true,
|
||||
"variableName": "hasOre",
|
||||
"operator": "equal",
|
||||
"compareValue": "true"
|
||||
},
|
||||
"children": [
|
||||
"store-sequence"
|
||||
],
|
||||
"attachedCondition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"name": "黑板值比较",
|
||||
"icon": "⚖️"
|
||||
},
|
||||
"conditionExpanded": false,
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "mine-conditional",
|
||||
"type": "conditional-decorator",
|
||||
"name": "检查是否没有矿石",
|
||||
"position": {
|
||||
"x": 400,
|
||||
"y": 250
|
||||
},
|
||||
"properties": {
|
||||
"conditionType": {
|
||||
"name": "条件类型",
|
||||
"type": "string",
|
||||
"value": "blackboardCompare",
|
||||
"description": "条件判断类型",
|
||||
"required": false
|
||||
},
|
||||
"executeWhenTrue": {
|
||||
"name": "条件为真时执行",
|
||||
"type": "boolean",
|
||||
"value": true,
|
||||
"description": "条件为真时是否执行子节点",
|
||||
"required": false
|
||||
},
|
||||
"executeWhenFalse": {
|
||||
"name": "条件为假时执行",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "条件为假时是否执行子节点",
|
||||
"required": false
|
||||
},
|
||||
"checkInterval": {
|
||||
"name": "检查间隔",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "条件检查间隔时间(秒),0表示每帧检查",
|
||||
"required": false
|
||||
},
|
||||
"abortType": {
|
||||
"name": "中止类型",
|
||||
"type": "select",
|
||||
"value": "None",
|
||||
"description": "决定节点在何种情况下会被中止",
|
||||
"options": ["None", "LowerPriority", "Self", "Both"],
|
||||
"required": false
|
||||
},
|
||||
"shouldReevaluate": true,
|
||||
"variableName": "hasOre",
|
||||
"operator": "equal",
|
||||
"compareValue": "false"
|
||||
},
|
||||
"children": [
|
||||
"mine-sequence"
|
||||
],
|
||||
"attachedCondition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"name": "黑板值比较",
|
||||
"icon": "⚖️"
|
||||
},
|
||||
"conditionExpanded": false,
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "store-sequence",
|
||||
"type": "sequence",
|
||||
"name": "存储矿石序列",
|
||||
"position": {
|
||||
"x": 200,
|
||||
"y": 350
|
||||
},
|
||||
"properties": {
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "去仓库存储矿石,然后设置状态为无矿石",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"store-ore-action",
|
||||
"set-no-ore"
|
||||
],
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "mine-sequence",
|
||||
"type": "sequence",
|
||||
"name": "挖矿序列",
|
||||
"position": {
|
||||
"x": 400,
|
||||
"y": 350
|
||||
},
|
||||
"properties": {
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "寻找并挖掘矿石,然后设置状态为有矿石",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"mine-ore-action",
|
||||
"set-has-ore"
|
||||
],
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "store-ore-action",
|
||||
"type": "event-action",
|
||||
"name": "前往仓库存储",
|
||||
"position": {
|
||||
"x": 150,
|
||||
"y": 450
|
||||
},
|
||||
"properties": {
|
||||
"eventName": {
|
||||
"name": "事件名称",
|
||||
"type": "string",
|
||||
"value": "store-ore",
|
||||
"description": "要执行的事件名称",
|
||||
"required": true
|
||||
},
|
||||
"parameters": {
|
||||
"name": "事件参数",
|
||||
"type": "string",
|
||||
"value": "{}",
|
||||
"description": "传递给事件处理函数的参数(JSON格式)",
|
||||
"required": false
|
||||
},
|
||||
"timeout": {
|
||||
"name": "超时时间",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "事件执行超时时间(秒),0表示无限制",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "set-no-ore",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置无矿石状态",
|
||||
"position": {
|
||||
"x": 250,
|
||||
"y": 450
|
||||
},
|
||||
"properties": {
|
||||
"variableName": {
|
||||
"name": "变量名",
|
||||
"type": "string",
|
||||
"value": "hasOre",
|
||||
"description": "黑板变量名",
|
||||
"required": true
|
||||
},
|
||||
"value": {
|
||||
"name": "设置值",
|
||||
"type": "string",
|
||||
"value": "false",
|
||||
"description": "要设置的值(留空则使用源变量)",
|
||||
"required": false
|
||||
},
|
||||
"force": {
|
||||
"name": "强制设置",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否忽略只读限制",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "mine-ore-action",
|
||||
"type": "event-action",
|
||||
"name": "寻找并挖掘矿石",
|
||||
"position": {
|
||||
"x": 350,
|
||||
"y": 450
|
||||
},
|
||||
"properties": {
|
||||
"eventName": {
|
||||
"name": "事件名称",
|
||||
"type": "string",
|
||||
"value": "find-and-mine-ore",
|
||||
"description": "要执行的事件名称",
|
||||
"required": true
|
||||
},
|
||||
"parameters": {
|
||||
"name": "事件参数",
|
||||
"type": "string",
|
||||
"value": "{}",
|
||||
"description": "传递给事件处理函数的参数(JSON格式)",
|
||||
"required": false
|
||||
},
|
||||
"timeout": {
|
||||
"name": "超时时间",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "事件执行超时时间(秒),0表示无限制",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "set-has-ore",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置有矿石状态",
|
||||
"position": {
|
||||
"x": 450,
|
||||
"y": 450
|
||||
},
|
||||
"properties": {
|
||||
"variableName": {
|
||||
"name": "变量名",
|
||||
"type": "string",
|
||||
"value": "hasOre",
|
||||
"description": "黑板变量名",
|
||||
"required": true
|
||||
},
|
||||
"value": {
|
||||
"name": "设置值",
|
||||
"type": "string",
|
||||
"value": "true",
|
||||
"description": "要设置的值(留空则使用源变量)",
|
||||
"required": false
|
||||
},
|
||||
"force": {
|
||||
"name": "强制设置",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否忽略只读限制",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "idle-action",
|
||||
"type": "event-action",
|
||||
"name": "默认待机",
|
||||
"position": {
|
||||
"x": 600,
|
||||
"y": 250
|
||||
},
|
||||
"properties": {
|
||||
"eventName": {
|
||||
"name": "事件名称",
|
||||
"type": "string",
|
||||
"value": "idle-behavior",
|
||||
"description": "要执行的事件名称",
|
||||
"required": true
|
||||
},
|
||||
"parameters": {
|
||||
"name": "事件参数",
|
||||
"type": "string",
|
||||
"value": "{}",
|
||||
"description": "传递给事件处理函数的参数(JSON格式)",
|
||||
"required": false
|
||||
},
|
||||
"timeout": {
|
||||
"name": "超时时间",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "事件执行超时时间(秒),0表示无限制",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [],
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
}
|
||||
],
|
||||
"connections": [],
|
||||
"metadata": {
|
||||
"name": "miner-ai",
|
||||
"description": "矿工AI示例 - 展示条件装饰器的正确使用方式",
|
||||
"version": "1.0",
|
||||
"created": "2025-06-24T15:00:13.826Z"
|
||||
},
|
||||
"blackboard": [
|
||||
{
|
||||
"name": "unitType",
|
||||
"type": "string",
|
||||
"value": "miner",
|
||||
"description": "单位类型 - 可拖拽到事件参数中",
|
||||
"group": "基础属性"
|
||||
},
|
||||
{
|
||||
"name": "hasOre",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否携带矿石 - 核心状态变量,被条件节点和设置节点使用",
|
||||
"group": "工作状态"
|
||||
},
|
||||
{
|
||||
"name": "currentHealth",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"description": "当前生命值 - 可拖拽用于健康检查条件",
|
||||
"group": "基础属性"
|
||||
},
|
||||
{
|
||||
"name": "maxHealth",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"description": "最大生命值",
|
||||
"group": "基础属性"
|
||||
},
|
||||
{
|
||||
"name": "targetPosition",
|
||||
"type": "object",
|
||||
"value": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"description": "目标位置 - 移动系统使用",
|
||||
"group": "移动属性"
|
||||
},
|
||||
{
|
||||
"name": "isMoving",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否正在移动",
|
||||
"group": "移动属性"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "f7fcacf2-eab6-4bef-b7b4-55d13707c90c",
|
||||
"uuid": "2dded9a7-03cd-465f-8419-7199e562c403",
|
||||
"files": [
|
||||
".btree",
|
||||
".json"
|
||||
@@ -1,859 +0,0 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "root",
|
||||
"type": "root",
|
||||
"name": "侦察兵AI根节点",
|
||||
"children": [
|
||||
"main-selector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "main-selector",
|
||||
"type": "selector",
|
||||
"name": "主选择器",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "根据优先级选择行为:生存 > 命令执行 > 自主侦察",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"survival-sequence",
|
||||
"command-sequence",
|
||||
"autonomous-sequence"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "survival-sequence",
|
||||
"type": "sequence",
|
||||
"name": "生存序列",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "处理威胁和生存相关行为",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"threat-detection",
|
||||
"survival-selector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "threat-detection",
|
||||
"type": "conditional-decorator",
|
||||
"name": "威胁检测",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "检测周围是否有威胁",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"survival-selector"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "threatDetected",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "survival-selector",
|
||||
"type": "selector",
|
||||
"name": "生存选择器",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "选择合适的生存策略",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"stealth-escape",
|
||||
"evasive-maneuver",
|
||||
"emergency-retreat"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "stealth-escape",
|
||||
"type": "sequence",
|
||||
"name": "隐蔽脱离",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "使用隐蔽能力脱离危险",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"can-stealth-check",
|
||||
"activate-stealth",
|
||||
"stealth-retreat"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "can-stealth-check",
|
||||
"type": "conditional-decorator",
|
||||
"name": "隐蔽能力检查",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None"
|
||||
},
|
||||
"children": [
|
||||
"activate-stealth"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "stealthAvailable",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "activate-stealth",
|
||||
"type": "event-action",
|
||||
"name": "激活隐蔽",
|
||||
"properties": {
|
||||
"eventName": "activate-stealth",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "激活隐蔽模式",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "stealth-retreat",
|
||||
"type": "event-action",
|
||||
"name": "隐蔽撤退",
|
||||
"properties": {
|
||||
"eventName": "stealth-retreat",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "在隐蔽状态下撤退",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "evasive-maneuver",
|
||||
"type": "event-action",
|
||||
"name": "规避机动",
|
||||
"properties": {
|
||||
"eventName": "evasive-maneuver",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "执行规避机动动作",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "emergency-retreat",
|
||||
"type": "event-action",
|
||||
"name": "紧急撤退",
|
||||
"properties": {
|
||||
"eventName": "emergency-retreat",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "快速撤退到安全区域",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "command-sequence",
|
||||
"type": "sequence",
|
||||
"name": "命令执行",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "执行玩家发布的侦察命令",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"has-command-check",
|
||||
"command-selector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "has-command-check",
|
||||
"type": "conditional-decorator",
|
||||
"name": "命令检查",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "检查是否有待执行的命令",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"command-selector"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "hasTarget",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "command-selector",
|
||||
"type": "selector",
|
||||
"name": "命令选择器",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "根据命令类型选择执行方式",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"scout-command",
|
||||
"move-command",
|
||||
"observe-command",
|
||||
"patrol-command"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "scout-command",
|
||||
"type": "sequence",
|
||||
"name": "侦察命令",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "执行区域侦察任务",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"is-scout-command",
|
||||
"scout-sequence"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "is-scout-command",
|
||||
"type": "conditional-decorator",
|
||||
"name": "侦察命令检查",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None"
|
||||
},
|
||||
"children": [
|
||||
"scout-sequence"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "scout"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "scout-sequence",
|
||||
"type": "sequence",
|
||||
"name": "侦察序列",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "完整的侦察流程",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"approach-carefully",
|
||||
"scan-area",
|
||||
"report-findings"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "approach-carefully",
|
||||
"type": "event-action",
|
||||
"name": "谨慎接近",
|
||||
"properties": {
|
||||
"eventName": "approach-carefully",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "谨慎接近目标区域",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "scan-area",
|
||||
"type": "event-action",
|
||||
"name": "扫描区域",
|
||||
"properties": {
|
||||
"eventName": "scan-area",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "扫描并记录区域信息",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "report-findings",
|
||||
"type": "event-action",
|
||||
"name": "报告发现",
|
||||
"properties": {
|
||||
"eventName": "report-findings",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "向指挥部报告侦察结果",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "move-command",
|
||||
"type": "sequence",
|
||||
"name": "移动命令",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "执行移动到目标位置",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"is-move-command",
|
||||
"stealth-move"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "is-move-command",
|
||||
"type": "conditional-decorator",
|
||||
"name": "移动命令检查",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None"
|
||||
},
|
||||
"children": [
|
||||
"stealth-move"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "move"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "stealth-move",
|
||||
"type": "event-action",
|
||||
"name": "隐蔽移动",
|
||||
"properties": {
|
||||
"eventName": "stealth-move",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "以隐蔽方式移动到目标位置",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "observe-command",
|
||||
"type": "sequence",
|
||||
"name": "观察命令",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "执行目标观察任务",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"is-observe-command",
|
||||
"observe-target"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "is-observe-command",
|
||||
"type": "conditional-decorator",
|
||||
"name": "观察命令检查",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None"
|
||||
},
|
||||
"children": [
|
||||
"observe-target"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "observe"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "observe-target",
|
||||
"type": "event-action",
|
||||
"name": "观察目标",
|
||||
"properties": {
|
||||
"eventName": "observe-target",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "持续观察指定目标",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "patrol-command",
|
||||
"type": "sequence",
|
||||
"name": "巡逻命令",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "执行区域巡逻",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"is-patrol-command",
|
||||
"reconnaissance-patrol"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "is-patrol-command",
|
||||
"type": "conditional-decorator",
|
||||
"name": "巡逻命令检查",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None"
|
||||
},
|
||||
"children": [
|
||||
"reconnaissance-patrol"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "patrol"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "reconnaissance-patrol",
|
||||
"type": "event-action",
|
||||
"name": "侦察巡逻",
|
||||
"properties": {
|
||||
"eventName": "reconnaissance-patrol",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "在指定区域进行侦察巡逻",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "autonomous-sequence",
|
||||
"type": "sequence",
|
||||
"name": "自主行为",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "没有命令时的自主侦察行为",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"autonomous-selector"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "autonomous-selector",
|
||||
"type": "selector",
|
||||
"name": "自主选择器",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "选择自主行为模式",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"explore-unknown",
|
||||
"monitor-area",
|
||||
"return-to-base"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "explore-unknown",
|
||||
"type": "sequence",
|
||||
"name": "探索未知区域",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "自主探索未知区域",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"has-unknown-area",
|
||||
"explore-action"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "has-unknown-area",
|
||||
"type": "conditional-decorator",
|
||||
"name": "未知区域检查",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None"
|
||||
},
|
||||
"children": [
|
||||
"explore-action"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "hasUnknownArea",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "explore-action",
|
||||
"type": "event-action",
|
||||
"name": "探索行动",
|
||||
"properties": {
|
||||
"eventName": "explore-unknown-area",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "探索最近的未知区域",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "monitor-area",
|
||||
"type": "sequence",
|
||||
"name": "监控区域",
|
||||
"properties": {
|
||||
"abortType": "None",
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "监控重要区域",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"children": [
|
||||
"has-monitoring-target",
|
||||
"monitor-action"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "has-monitoring-target",
|
||||
"type": "conditional-decorator",
|
||||
"name": "监控目标检查",
|
||||
"properties": {
|
||||
"conditionType": "custom",
|
||||
"executeWhenTrue": true,
|
||||
"executeWhenFalse": false,
|
||||
"checkInterval": 0,
|
||||
"abortType": "None"
|
||||
},
|
||||
"children": [
|
||||
"monitor-action"
|
||||
],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "hasMonitoringTarget",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "monitor-action",
|
||||
"type": "event-action",
|
||||
"name": "监控行动",
|
||||
"properties": {
|
||||
"eventName": "monitor-strategic-area",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "监控战略重要区域",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "return-to-base",
|
||||
"type": "event-action",
|
||||
"name": "返回基地",
|
||||
"properties": {
|
||||
"eventName": "return-to-base",
|
||||
"parameters": "{}",
|
||||
"timeout": 0,
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "返回基地待命",
|
||||
"description": "",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"blackboard": [
|
||||
{
|
||||
"name": "unitType",
|
||||
"type": "string",
|
||||
"value": "scout",
|
||||
"description": "单位类型"
|
||||
},
|
||||
{
|
||||
"name": "currentHealth",
|
||||
"type": "number",
|
||||
"value": 80,
|
||||
"description": "当前生命值"
|
||||
},
|
||||
{
|
||||
"name": "maxHealth",
|
||||
"type": "number",
|
||||
"value": 80,
|
||||
"description": "最大生命值"
|
||||
},
|
||||
{
|
||||
"name": "threatDetected",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否检测到威胁"
|
||||
},
|
||||
{
|
||||
"name": "stealthAvailable",
|
||||
"type": "boolean",
|
||||
"value": true,
|
||||
"description": "隐蔽能力是否可用"
|
||||
},
|
||||
{
|
||||
"name": "currentCommand",
|
||||
"type": "string",
|
||||
"value": "idle",
|
||||
"description": "当前执行的命令"
|
||||
},
|
||||
{
|
||||
"name": "hasTarget",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否有目标"
|
||||
},
|
||||
{
|
||||
"name": "targetPosition",
|
||||
"type": "object",
|
||||
"value": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"description": "目标位置"
|
||||
},
|
||||
{
|
||||
"name": "hasUnknownArea",
|
||||
"type": "boolean",
|
||||
"value": true,
|
||||
"description": "是否有未探索的区域"
|
||||
},
|
||||
{
|
||||
"name": "hasMonitoringTarget",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否有需要监控的目标"
|
||||
},
|
||||
{
|
||||
"name": "visionRange",
|
||||
"type": "number",
|
||||
"value": 8,
|
||||
"description": "视野范围"
|
||||
},
|
||||
{
|
||||
"name": "moveSpeed",
|
||||
"type": "number",
|
||||
"value": 5,
|
||||
"description": "移动速度"
|
||||
},
|
||||
{
|
||||
"name": "stealthDuration",
|
||||
"type": "number",
|
||||
"value": 10,
|
||||
"description": "隐蔽持续时间"
|
||||
},
|
||||
{
|
||||
"name": "detectionRadius",
|
||||
"type": "number",
|
||||
"value": 6,
|
||||
"description": "威胁检测半径"
|
||||
},
|
||||
{
|
||||
"name": "lastReportTime",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "上次报告时间"
|
||||
},
|
||||
{
|
||||
"name": "exploredAreas",
|
||||
"type": "array",
|
||||
"value": [],
|
||||
"description": "已探索区域列表"
|
||||
},
|
||||
{
|
||||
"name": "intelligenceData",
|
||||
"type": "object",
|
||||
"value": {},
|
||||
"description": "收集的情报数据"
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"name": "behavior-tree",
|
||||
"created": "2025-06-24T09:20:19.582Z",
|
||||
"version": "1.0",
|
||||
"exportType": "clean"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "1fb4b238-4ceb-4daa-817a-ac745bf598ca",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "96872e28-7488-4d80-906b-edcc3511c84b",
|
||||
"files": [
|
||||
".btree",
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,483 +0,0 @@
|
||||
{
|
||||
"id": "soldier-ai",
|
||||
"name": "士兵AI行为树",
|
||||
"description": "士兵单位的战斗AI系统,包含攻击、防御、巡逻等军事行为",
|
||||
"version": "1.0.0",
|
||||
"author": "ECS Framework",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "root",
|
||||
"type": "root",
|
||||
"name": "士兵AI根节点",
|
||||
"description": "士兵AI的根节点,管理所有战斗行为",
|
||||
"children": ["main-selector"]
|
||||
},
|
||||
{
|
||||
"id": "main-selector",
|
||||
"type": "selector",
|
||||
"name": "主行为选择器",
|
||||
"description": "按优先级选择士兵行为:撤退 > 战斗 > 巡逻 > 待命",
|
||||
"children": ["retreat-behavior", "combat-behavior", "patrol-behavior", "standby-behavior"]
|
||||
},
|
||||
{
|
||||
"id": "retreat-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "撤退行为",
|
||||
"description": "生命值过低时撤退",
|
||||
"children": ["retreat-sequence"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "shouldRetreat",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "retreat-sequence",
|
||||
"type": "sequence",
|
||||
"name": "撤退序列",
|
||||
"description": "执行撤退的完整流程",
|
||||
"children": ["set-retreat-state", "call-for-help", "retreat-move"]
|
||||
},
|
||||
{
|
||||
"id": "set-retreat-state",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置撤退状态",
|
||||
"description": "将士兵状态设置为撤退",
|
||||
"properties": {
|
||||
"variableName": "currentState",
|
||||
"value": "retreating"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "call-for-help",
|
||||
"type": "event-action",
|
||||
"name": "呼叫支援",
|
||||
"description": "向附近友军发出支援请求",
|
||||
"properties": {
|
||||
"eventName": "call-for-help"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "retreat-move",
|
||||
"type": "event-action",
|
||||
"name": "撤退移动",
|
||||
"description": "快速移动到安全区域",
|
||||
"properties": {
|
||||
"eventName": "retreat-to-safety"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "combat-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "战斗行为",
|
||||
"description": "发现敌人时进入战斗状态",
|
||||
"children": ["combat-selector"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "hasEnemy",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "combat-selector",
|
||||
"type": "selector",
|
||||
"name": "战斗选择器",
|
||||
"description": "根据距离选择战斗策略",
|
||||
"children": ["ranged-attack", "close-combat", "chase-enemy"]
|
||||
},
|
||||
{
|
||||
"id": "ranged-attack",
|
||||
"type": "conditional-decorator",
|
||||
"name": "远程攻击",
|
||||
"description": "在远程攻击范围内时使用远程武器",
|
||||
"children": ["ranged-sequence"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "isInRangedRange",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ranged-sequence",
|
||||
"type": "sequence",
|
||||
"name": "远程攻击序列",
|
||||
"description": "执行远程攻击的完整流程",
|
||||
"children": ["aim-target", "ranged-cooldown-check", "fire-ranged"]
|
||||
},
|
||||
{
|
||||
"id": "aim-target",
|
||||
"type": "event-action",
|
||||
"name": "瞄准目标",
|
||||
"description": "瞄准敌方目标",
|
||||
"properties": {
|
||||
"eventName": "aim-at-target"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ranged-cooldown-check",
|
||||
"type": "conditional-decorator",
|
||||
"name": "远程冷却检查",
|
||||
"description": "检查远程攻击冷却时间",
|
||||
"children": ["execute-ranged"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "canRangedAttack",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "execute-ranged",
|
||||
"type": "event-action",
|
||||
"name": "执行远程攻击",
|
||||
"description": "发射远程武器",
|
||||
"properties": {
|
||||
"eventName": "ranged-attack"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fire-ranged",
|
||||
"type": "log-action",
|
||||
"name": "远程攻击日志",
|
||||
"description": "记录远程攻击",
|
||||
"properties": {
|
||||
"message": "士兵执行远程攻击"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "close-combat",
|
||||
"type": "conditional-decorator",
|
||||
"name": "近战攻击",
|
||||
"description": "在近战范围内时使用近战武器",
|
||||
"children": ["melee-sequence"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "isInMeleeRange",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "melee-sequence",
|
||||
"type": "sequence",
|
||||
"name": "近战攻击序列",
|
||||
"description": "执行近战攻击的完整流程",
|
||||
"children": ["melee-cooldown-check", "execute-melee", "melee-log"]
|
||||
},
|
||||
{
|
||||
"id": "melee-cooldown-check",
|
||||
"type": "conditional-decorator",
|
||||
"name": "近战冷却检查",
|
||||
"description": "检查近战攻击冷却时间",
|
||||
"children": ["melee-attack"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "canMeleeAttack",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "melee-attack",
|
||||
"type": "event-action",
|
||||
"name": "近战攻击",
|
||||
"description": "执行近战攻击",
|
||||
"properties": {
|
||||
"eventName": "melee-attack"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "execute-melee",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "更新近战冷却",
|
||||
"description": "重置近战攻击冷却时间",
|
||||
"properties": {
|
||||
"variableName": "lastMeleeTime",
|
||||
"value": "currentTime"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "melee-log",
|
||||
"type": "log-action",
|
||||
"name": "近战攻击日志",
|
||||
"description": "记录近战攻击",
|
||||
"properties": {
|
||||
"message": "士兵执行近战攻击"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "chase-enemy",
|
||||
"type": "sequence",
|
||||
"name": "追击敌人",
|
||||
"description": "追击敌方目标",
|
||||
"children": ["set-chase-state", "move-to-enemy"]
|
||||
},
|
||||
{
|
||||
"id": "set-chase-state",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置追击状态",
|
||||
"description": "将士兵状态设置为追击",
|
||||
"properties": {
|
||||
"variableName": "currentState",
|
||||
"value": "chasing"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "move-to-enemy",
|
||||
"type": "event-action",
|
||||
"name": "移动到敌人",
|
||||
"description": "快速移动到敌人位置",
|
||||
"properties": {
|
||||
"eventName": "move-to-target"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "patrol-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "巡逻行为",
|
||||
"description": "没有敌人时执行巡逻",
|
||||
"children": ["patrol-sequence"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "patrol"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "patrol-sequence",
|
||||
"type": "sequence",
|
||||
"name": "巡逻序列",
|
||||
"description": "执行巡逻的完整流程",
|
||||
"children": ["set-patrol-state", "patrol-move", "patrol-scan", "patrol-wait"]
|
||||
},
|
||||
{
|
||||
"id": "set-patrol-state",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置巡逻状态",
|
||||
"description": "将士兵状态设置为巡逻",
|
||||
"properties": {
|
||||
"variableName": "currentState",
|
||||
"value": "patrolling"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "patrol-move",
|
||||
"type": "event-action",
|
||||
"name": "巡逻移动",
|
||||
"description": "沿巡逻路线移动",
|
||||
"properties": {
|
||||
"eventName": "patrol-move"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "patrol-scan",
|
||||
"type": "event-action",
|
||||
"name": "扫描敌人",
|
||||
"description": "扫描周围是否有敌人",
|
||||
"properties": {
|
||||
"eventName": "scan-for-enemies"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "patrol-wait",
|
||||
"type": "wait-action",
|
||||
"name": "巡逻等待",
|
||||
"description": "在巡逻点等待",
|
||||
"properties": {
|
||||
"waitTime": 2.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "standby-behavior",
|
||||
"type": "sequence",
|
||||
"name": "待命行为",
|
||||
"description": "默认的待命状态",
|
||||
"children": ["set-standby-state", "standby-wait"]
|
||||
},
|
||||
{
|
||||
"id": "set-standby-state",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置待命状态",
|
||||
"description": "将士兵状态设置为待命",
|
||||
"properties": {
|
||||
"variableName": "currentState",
|
||||
"value": "standby"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "standby-wait",
|
||||
"type": "wait-action",
|
||||
"name": "待命等待",
|
||||
"description": "待命状态下等待",
|
||||
"properties": {
|
||||
"waitTime": 1.0
|
||||
}
|
||||
}
|
||||
],
|
||||
"blackboard": [
|
||||
{
|
||||
"name": "currentState",
|
||||
"type": "string",
|
||||
"value": "standby",
|
||||
"description": "士兵当前状态(standby、patrolling、chasing、attacking、retreating)",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "currentCommand",
|
||||
"type": "string",
|
||||
"value": "patrol",
|
||||
"description": "当前接收的命令(patrol、attack、defend、move、standby)",
|
||||
"group": "命令"
|
||||
},
|
||||
{
|
||||
"name": "hasEnemy",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否发现敌人",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "enemyDistance",
|
||||
"type": "number",
|
||||
"value": 999,
|
||||
"description": "与最近敌人的距离",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "isInMeleeRange",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否在近战攻击范围内",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "isInRangedRange",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否在远程攻击范围内",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "canMeleeAttack",
|
||||
"type": "boolean",
|
||||
"value": true,
|
||||
"description": "是否可以进行近战攻击(冷却检查)",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "canRangedAttack",
|
||||
"type": "boolean",
|
||||
"value": true,
|
||||
"description": "是否可以进行远程攻击(冷却检查)",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "lastMeleeTime",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "上次近战攻击时间",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "lastRangedTime",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "上次远程攻击时间",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "meleeCooldown",
|
||||
"type": "number",
|
||||
"value": 1.0,
|
||||
"description": "近战攻击冷却时间",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "rangedCooldown",
|
||||
"type": "number",
|
||||
"value": 2.0,
|
||||
"description": "远程攻击冷却时间",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "meleeRange",
|
||||
"type": "number",
|
||||
"value": 2.0,
|
||||
"description": "近战攻击范围",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "rangedRange",
|
||||
"type": "number",
|
||||
"value": 8.0,
|
||||
"description": "远程攻击范围",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "shouldRetreat",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否应该撤退(生命值低或寡不敌众)",
|
||||
"group": "战斗"
|
||||
},
|
||||
{
|
||||
"name": "currentHealth",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"description": "当前生命值",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "maxHealth",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"description": "最大生命值",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "armor",
|
||||
"type": "number",
|
||||
"value": 10,
|
||||
"description": "护甲值",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "moveSpeed",
|
||||
"type": "number",
|
||||
"value": 4.0,
|
||||
"description": "移动速度",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "patrolRadius",
|
||||
"type": "number",
|
||||
"value": 10.0,
|
||||
"description": "巡逻半径",
|
||||
"group": "属性"
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"created": "2024-01-01T00:00:00.000Z",
|
||||
"nodeCount": 35,
|
||||
"editorVersion": "1.0.0",
|
||||
"description": "士兵AI展示了完整的战斗单位行为模式,包括多种攻击方式、战术撤退、巡逻警戒等军事行为的智能决策。"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "843934be-5d8e-49b3-93e5-34999ca6f50e",
|
||||
"files": [
|
||||
".btree",
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,380 +0,0 @@
|
||||
{
|
||||
"id": "worker-ai",
|
||||
"name": "工人AI行为树",
|
||||
"description": "工人单位的智能行为系统,包含资源收集、建造、修理等功能",
|
||||
"version": "1.0.0",
|
||||
"author": "ECS Framework",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "root",
|
||||
"type": "root",
|
||||
"name": "工人AI根节点",
|
||||
"description": "工人AI的根节点,管理所有工人行为",
|
||||
"children": ["main-selector"]
|
||||
},
|
||||
{
|
||||
"id": "main-selector",
|
||||
"type": "selector",
|
||||
"name": "主行为选择器",
|
||||
"description": "按优先级选择工人行为:逃跑 > 执行命令 > 空闲",
|
||||
"children": ["flee-behavior", "command-behavior", "idle-behavior"]
|
||||
},
|
||||
{
|
||||
"id": "flee-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "逃跑行为",
|
||||
"description": "生命值低时逃跑到安全区域",
|
||||
"children": ["flee-sequence"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "isLowHealth",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "flee-sequence",
|
||||
"type": "sequence",
|
||||
"name": "逃跑序列",
|
||||
"description": "执行逃跑行为的完整序列",
|
||||
"children": ["set-flee-state", "move-to-safety", "heal-self"]
|
||||
},
|
||||
{
|
||||
"id": "set-flee-state",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置逃跑状态",
|
||||
"description": "将工人状态设置为逃跑",
|
||||
"properties": {
|
||||
"variableName": "currentState",
|
||||
"value": "fleeing"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "move-to-safety",
|
||||
"type": "event-action",
|
||||
"name": "移动到安全区域",
|
||||
"description": "移动到最近的安全建筑",
|
||||
"properties": {
|
||||
"eventName": "move-to-safety"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "heal-self",
|
||||
"type": "event-action",
|
||||
"name": "自我治疗",
|
||||
"description": "使用治疗物品恢复生命值",
|
||||
"properties": {
|
||||
"eventName": "heal-self"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "command-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "命令行为",
|
||||
"description": "有命令时执行相应行为",
|
||||
"children": ["command-selector"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "hasTarget",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "command-selector",
|
||||
"type": "selector",
|
||||
"name": "命令选择器",
|
||||
"description": "根据命令类型选择行为",
|
||||
"children": ["gather-behavior", "build-behavior", "repair-behavior", "move-behavior"]
|
||||
},
|
||||
{
|
||||
"id": "gather-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "收集行为",
|
||||
"description": "收集资源的行为",
|
||||
"children": ["gather-sequence"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "gather"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "gather-sequence",
|
||||
"type": "sequence",
|
||||
"name": "收集序列",
|
||||
"description": "完整的资源收集流程",
|
||||
"children": ["move-to-resource", "collect-resource", "return-to-base"]
|
||||
},
|
||||
{
|
||||
"id": "move-to-resource",
|
||||
"type": "event-action",
|
||||
"name": "移动到资源",
|
||||
"description": "移动到目标资源点",
|
||||
"properties": {
|
||||
"eventName": "move-to-target"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "collect-resource",
|
||||
"type": "event-action",
|
||||
"name": "收集资源",
|
||||
"description": "执行资源收集动作",
|
||||
"properties": {
|
||||
"eventName": "gather-resource"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "return-to-base",
|
||||
"type": "event-action",
|
||||
"name": "返回基地",
|
||||
"description": "将资源运回基地",
|
||||
"properties": {
|
||||
"eventName": "return-to-base"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "build-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "建造行为",
|
||||
"description": "建造建筑的行为",
|
||||
"children": ["build-sequence"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "build"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "build-sequence",
|
||||
"type": "sequence",
|
||||
"name": "建造序列",
|
||||
"description": "完整的建造流程",
|
||||
"children": ["move-to-build-site", "construct-building"]
|
||||
},
|
||||
{
|
||||
"id": "move-to-build-site",
|
||||
"type": "event-action",
|
||||
"name": "移动到建筑工地",
|
||||
"description": "移动到指定的建筑位置",
|
||||
"properties": {
|
||||
"eventName": "move-to-target"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "construct-building",
|
||||
"type": "event-action",
|
||||
"name": "建造建筑",
|
||||
"description": "执行建筑建造动作",
|
||||
"properties": {
|
||||
"eventName": "construct-building"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "repair-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "修理行为",
|
||||
"description": "修理损坏建筑的行为",
|
||||
"children": ["repair-sequence"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "repair"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "repair-sequence",
|
||||
"type": "sequence",
|
||||
"name": "修理序列",
|
||||
"description": "完整的修理流程",
|
||||
"children": ["move-to-building", "repair-building"]
|
||||
},
|
||||
{
|
||||
"id": "move-to-building",
|
||||
"type": "event-action",
|
||||
"name": "移动到建筑",
|
||||
"description": "移动到需要修理的建筑",
|
||||
"properties": {
|
||||
"eventName": "move-to-target"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "repair-building",
|
||||
"type": "event-action",
|
||||
"name": "修理建筑",
|
||||
"description": "执行建筑修理动作",
|
||||
"properties": {
|
||||
"eventName": "repair-building"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "move-behavior",
|
||||
"type": "conditional-decorator",
|
||||
"name": "移动行为",
|
||||
"description": "单纯的移动行为",
|
||||
"children": ["simple-move"],
|
||||
"condition": {
|
||||
"type": "blackboard-value-comparison",
|
||||
"properties": {
|
||||
"variableName": "currentCommand",
|
||||
"compareOperator": "equals",
|
||||
"compareValue": "move"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "simple-move",
|
||||
"type": "event-action",
|
||||
"name": "简单移动",
|
||||
"description": "移动到指定位置",
|
||||
"properties": {
|
||||
"eventName": "move-to-target"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "idle-behavior",
|
||||
"type": "sequence",
|
||||
"name": "空闲行为",
|
||||
"description": "没有任务时的默认行为",
|
||||
"children": ["set-idle-state", "idle-wait"]
|
||||
},
|
||||
{
|
||||
"id": "set-idle-state",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置空闲状态",
|
||||
"description": "将工人状态设置为空闲",
|
||||
"properties": {
|
||||
"variableName": "currentState",
|
||||
"value": "idle"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "idle-wait",
|
||||
"type": "wait-action",
|
||||
"name": "空闲等待",
|
||||
"description": "空闲时等待一段时间",
|
||||
"properties": {
|
||||
"waitTime": 1.0
|
||||
}
|
||||
}
|
||||
],
|
||||
"blackboard": [
|
||||
{
|
||||
"name": "currentState",
|
||||
"type": "string",
|
||||
"value": "idle",
|
||||
"description": "工人当前状态(idle、working、fleeing、gathering、building、repairing)",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "currentCommand",
|
||||
"type": "string",
|
||||
"value": "idle",
|
||||
"description": "当前接收的命令(idle、move、gather、build、repair、attack)",
|
||||
"group": "命令"
|
||||
},
|
||||
{
|
||||
"name": "hasTarget",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否有目标任务",
|
||||
"group": "目标"
|
||||
},
|
||||
{
|
||||
"name": "targetPosition",
|
||||
"type": "object",
|
||||
"value": {"x": 0, "y": 0, "z": 0},
|
||||
"description": "目标位置坐标",
|
||||
"group": "目标"
|
||||
},
|
||||
{
|
||||
"name": "currentHealth",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"description": "当前生命值",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "maxHealth",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"description": "最大生命值",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "healthPercentage",
|
||||
"type": "number",
|
||||
"value": 1.0,
|
||||
"description": "生命值百分比",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "isLowHealth",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否生命值较低(低于30%)",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "moveSpeed",
|
||||
"type": "number",
|
||||
"value": 3.0,
|
||||
"description": "移动速度",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "gatherSpeed",
|
||||
"type": "number",
|
||||
"value": 1.0,
|
||||
"description": "资源收集速度",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "buildSpeed",
|
||||
"type": "number",
|
||||
"value": 1.0,
|
||||
"description": "建造速度",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "carryCapacity",
|
||||
"type": "number",
|
||||
"value": 10,
|
||||
"description": "携带容量",
|
||||
"group": "属性"
|
||||
},
|
||||
{
|
||||
"name": "currentLoad",
|
||||
"type": "number",
|
||||
"value": 0,
|
||||
"description": "当前携带量",
|
||||
"group": "状态"
|
||||
},
|
||||
{
|
||||
"name": "resourceType",
|
||||
"type": "string",
|
||||
"value": "none",
|
||||
"description": "携带的资源类型",
|
||||
"group": "状态"
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"created": "2024-01-01T00:00:00.000Z",
|
||||
"nodeCount": 30,
|
||||
"editorVersion": "1.0.0",
|
||||
"description": "工人AI展示了完整的RTS单位行为模式,包括生存、工作、建造等多种行为的优先级管理和状态切换。"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "59141420-59cc-425f-b519-1073df8b93f8",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user