支持先加入实体后加入系统以让matcher进行实体匹配/优化行为树节点效果及逻辑
This commit is contained in:
@@ -0,0 +1,818 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "root_1",
|
||||
"type": "root",
|
||||
"name": "行为树指南根",
|
||||
"icon": "🌳",
|
||||
"x": 1270,
|
||||
"y": 50,
|
||||
"children": [
|
||||
"selector_main"
|
||||
],
|
||||
"properties": {},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": false,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "selector_main",
|
||||
"type": "selector",
|
||||
"name": "主选择器",
|
||||
"icon": "?",
|
||||
"x": 1280,
|
||||
"y": 180,
|
||||
"children": [
|
||||
"repeater_patrol",
|
||||
"selector_combat",
|
||||
"sequence_idle"
|
||||
],
|
||||
"properties": {
|
||||
"abortType": {
|
||||
"name": "中止类型",
|
||||
"type": "select",
|
||||
"value": "LowerPriority",
|
||||
"description": "决定节点在何种情况下会被中止",
|
||||
"options": [
|
||||
"None",
|
||||
"LowerPriority",
|
||||
"Self",
|
||||
"Both"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "repeater_patrol",
|
||||
"type": "repeater",
|
||||
"name": "巡逻重复器",
|
||||
"icon": "🔄",
|
||||
"x": 510,
|
||||
"y": 360,
|
||||
"children": [
|
||||
"sequence_patrol"
|
||||
],
|
||||
"properties": {
|
||||
"count": {
|
||||
"name": "重复次数",
|
||||
"type": "number",
|
||||
"value": -1,
|
||||
"description": "重复执行次数,-1表示无限重复,必须是正整数",
|
||||
"required": true
|
||||
},
|
||||
"continueOnFailure": {
|
||||
"name": "失败时继续",
|
||||
"type": "boolean",
|
||||
"value": true,
|
||||
"description": "子节点失败时是否继续重复",
|
||||
"required": false
|
||||
},
|
||||
"delayBetween": {
|
||||
"name": "重复间隔",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "重复之间是否有延迟",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_patrol",
|
||||
"type": "sequence",
|
||||
"name": "巡逻序列",
|
||||
"icon": "→",
|
||||
"x": 510,
|
||||
"y": 580,
|
||||
"children": [
|
||||
"decorator_patrol_check",
|
||||
"action_patrol"
|
||||
],
|
||||
"properties": {
|
||||
"abortType": {
|
||||
"name": "中止类型",
|
||||
"type": "select",
|
||||
"value": "None",
|
||||
"description": "决定节点在何种情况下会被中止",
|
||||
"options": [
|
||||
"None",
|
||||
"LowerPriority",
|
||||
"Self",
|
||||
"Both"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "decorator_patrol_check",
|
||||
"type": "conditional-decorator",
|
||||
"name": "巡逻条件检查",
|
||||
"icon": "🔀",
|
||||
"x": 400,
|
||||
"y": 760,
|
||||
"children": [
|
||||
"log_patrolling"
|
||||
],
|
||||
"properties": {
|
||||
"conditionType": {
|
||||
"name": "条件类型",
|
||||
"type": "select",
|
||||
"value": "custom",
|
||||
"description": "装饰器使用的条件类型",
|
||||
"options": [
|
||||
"custom",
|
||||
"random",
|
||||
"hasComponent",
|
||||
"hasTag",
|
||||
"isActive",
|
||||
"numericCompare",
|
||||
"propertyExists"
|
||||
],
|
||||
"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": 1,
|
||||
"description": "条件检查间隔时间(秒),0表示每帧检查",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"attachedCondition": {
|
||||
"type": "condition-custom",
|
||||
"name": "巡逻状态检查",
|
||||
"icon": "⚙️",
|
||||
"properties": {
|
||||
"conditionCode": {
|
||||
"name": "条件代码",
|
||||
"type": "code",
|
||||
"value": "(context) => {\n // 检查是否处于巡逻状态\n return context.blackboard && context.blackboard.getValue('state') === 'patrol';\n}",
|
||||
"description": "条件判断函数代码",
|
||||
"required": true
|
||||
},
|
||||
"conditionName": {
|
||||
"name": "条件名称",
|
||||
"type": "string",
|
||||
"value": "巡逻状态检查",
|
||||
"description": "用于调试的条件名称",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "log_patrolling",
|
||||
"type": "log-action",
|
||||
"name": "记录巡逻",
|
||||
"icon": "📝",
|
||||
"x": 400,
|
||||
"y": 1000,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"message": {
|
||||
"name": "日志消息",
|
||||
"type": "string",
|
||||
"value": "正在执行巡逻任务,当前状态: {{state}}",
|
||||
"description": "使用{{}}引用黑板变量显示当前状态",
|
||||
"required": true
|
||||
},
|
||||
"logLevel": {
|
||||
"name": "日志级别",
|
||||
"type": "select",
|
||||
"value": "info",
|
||||
"description": "日志输出级别",
|
||||
"options": [
|
||||
"debug",
|
||||
"info",
|
||||
"warn",
|
||||
"error"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "action_patrol",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "执行巡逻",
|
||||
"icon": "📝",
|
||||
"x": 620,
|
||||
"y": 760,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"variableName": {
|
||||
"name": "变量名",
|
||||
"type": "string",
|
||||
"value": "lastAction",
|
||||
"description": "黑板变量名",
|
||||
"required": true
|
||||
},
|
||||
"value": {
|
||||
"name": "设置值",
|
||||
"type": "string",
|
||||
"value": "{{state}}_执行中",
|
||||
"description": "使用{{}}引用当前状态并添加后缀",
|
||||
"required": false
|
||||
},
|
||||
"sourceVariable": {
|
||||
"name": "源变量名",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
"description": "从另一个黑板变量复制值",
|
||||
"required": false
|
||||
},
|
||||
"force": {
|
||||
"name": "强制设置",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否忽略只读限制",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "selector_combat",
|
||||
"type": "selector",
|
||||
"name": "战斗选择器",
|
||||
"icon": "?",
|
||||
"x": 1170,
|
||||
"y": 360,
|
||||
"children": [
|
||||
"sequence_attack",
|
||||
"sequence_defend"
|
||||
],
|
||||
"properties": {
|
||||
"abortType": {
|
||||
"name": "中止类型",
|
||||
"type": "select",
|
||||
"value": "None",
|
||||
"description": "决定节点在何种情况下会被中止",
|
||||
"options": [
|
||||
"None",
|
||||
"LowerPriority",
|
||||
"Self",
|
||||
"Both"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_attack",
|
||||
"type": "sequence",
|
||||
"name": "攻击序列",
|
||||
"icon": "→",
|
||||
"x": 950,
|
||||
"y": 540,
|
||||
"children": [
|
||||
"inverter_enemy",
|
||||
"action_attack"
|
||||
],
|
||||
"properties": {
|
||||
"abortType": {
|
||||
"name": "中止类型",
|
||||
"type": "select",
|
||||
"value": "Self",
|
||||
"description": "决定节点在何种情况下会被中止",
|
||||
"options": [
|
||||
"None",
|
||||
"LowerPriority",
|
||||
"Self",
|
||||
"Both"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "inverter_enemy",
|
||||
"type": "inverter",
|
||||
"name": "敌人检查反转",
|
||||
"icon": "!",
|
||||
"x": 840,
|
||||
"y": 720,
|
||||
"children": [
|
||||
"condition_enemy"
|
||||
],
|
||||
"properties": {},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "condition_enemy",
|
||||
"type": "condition-random",
|
||||
"name": "随机敌人出现",
|
||||
"icon": "🎲",
|
||||
"x": 840,
|
||||
"y": 880,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"successProbability": {
|
||||
"name": "成功概率",
|
||||
"type": "number",
|
||||
"value": 0.3,
|
||||
"description": "条件成功的概率 (0.0 - 1.0)",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "action_attack",
|
||||
"type": "log-action",
|
||||
"name": "攻击动作",
|
||||
"icon": "📝",
|
||||
"x": 1060,
|
||||
"y": 720,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"message": {
|
||||
"name": "日志消息",
|
||||
"type": "string",
|
||||
"value": "发动攻击!生命值: {{health}}, 能量: {{energy}}",
|
||||
"description": "使用{{}}引用显示战斗时的状态信息",
|
||||
"required": true
|
||||
},
|
||||
"logLevel": {
|
||||
"name": "日志级别",
|
||||
"type": "select",
|
||||
"value": "warn",
|
||||
"description": "日志输出级别",
|
||||
"options": [
|
||||
"debug",
|
||||
"info",
|
||||
"warn",
|
||||
"error"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_defend",
|
||||
"type": "sequence",
|
||||
"name": "防御序列",
|
||||
"icon": "→",
|
||||
"x": 1390,
|
||||
"y": 540,
|
||||
"children": [
|
||||
"wait_defend",
|
||||
"action_defend"
|
||||
],
|
||||
"properties": {
|
||||
"abortType": {
|
||||
"name": "中止类型",
|
||||
"type": "select",
|
||||
"value": "None",
|
||||
"description": "决定节点在何种情况下会被中止",
|
||||
"options": [
|
||||
"None",
|
||||
"LowerPriority",
|
||||
"Self",
|
||||
"Both"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "wait_defend",
|
||||
"type": "wait-action",
|
||||
"name": "防御准备",
|
||||
"icon": "⏰",
|
||||
"x": 1280,
|
||||
"y": 720,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"waitTime": {
|
||||
"name": "等待时间",
|
||||
"type": "number",
|
||||
"value": 0.5,
|
||||
"description": "等待时间(秒),必须大于0",
|
||||
"required": true
|
||||
},
|
||||
"useExternalTime": {
|
||||
"name": "使用外部时间",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否使用上下文提供的deltaTime,否则使用内部时间计算",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "action_defend",
|
||||
"type": "execute-action",
|
||||
"name": "执行防御",
|
||||
"icon": "⚙️",
|
||||
"x": 1500,
|
||||
"y": 720,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"actionCode": {
|
||||
"name": "动作代码",
|
||||
"type": "code",
|
||||
"value": "(context) => {\n // 防御逻辑\n console.log('开始防御姿态');\n if(context.blackboard) {\n context.blackboard.setValue('defendActive', true);\n context.blackboard.setValue('lastAction', '防御中');\n }\n return 'success';\n}",
|
||||
"description": "要执行的动作函数代码",
|
||||
"required": true
|
||||
},
|
||||
"actionName": {
|
||||
"name": "动作名称",
|
||||
"type": "string",
|
||||
"value": "防御动作_生命值{{health}}",
|
||||
"description": "使用{{}}引用在动作名称中显示生命值",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_idle",
|
||||
"type": "sequence",
|
||||
"name": "闲置序列",
|
||||
"icon": "→",
|
||||
"x": 1940,
|
||||
"y": 360,
|
||||
"children": [
|
||||
"action_idle",
|
||||
"log_status",
|
||||
"wait_idle"
|
||||
],
|
||||
"properties": {
|
||||
"abortType": {
|
||||
"name": "中止类型",
|
||||
"type": "select",
|
||||
"value": "None",
|
||||
"description": "决定节点在何种情况下会被中止",
|
||||
"options": [
|
||||
"None",
|
||||
"LowerPriority",
|
||||
"Self",
|
||||
"Both"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": true,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "action_idle",
|
||||
"type": "set-blackboard-value",
|
||||
"name": "设置闲置",
|
||||
"icon": "📝",
|
||||
"x": 1720,
|
||||
"y": 540,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"variableName": {
|
||||
"name": "变量名",
|
||||
"type": "string",
|
||||
"value": "state",
|
||||
"description": "黑板变量名",
|
||||
"required": true
|
||||
},
|
||||
"value": {
|
||||
"name": "设置值",
|
||||
"type": "string",
|
||||
"value": "idle",
|
||||
"description": "要设置的值(留空则使用源变量)",
|
||||
"required": false
|
||||
},
|
||||
"sourceVariable": {
|
||||
"name": "源变量名",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
"description": "从另一个黑板变量复制值",
|
||||
"required": false
|
||||
},
|
||||
"force": {
|
||||
"name": "强制设置",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否忽略只读限制",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "log_status",
|
||||
"type": "log-action",
|
||||
"name": "状态报告",
|
||||
"icon": "📝",
|
||||
"x": 1940,
|
||||
"y": 540,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"message": {
|
||||
"name": "日志消息",
|
||||
"type": "string",
|
||||
"value": "状态报告 - 当前: {{state}}, 上次动作: {{lastAction}}, 防御中: {{defendActive}}",
|
||||
"description": "完整的黑板变量引用示例,显示多个变量值",
|
||||
"required": true
|
||||
},
|
||||
"logLevel": {
|
||||
"name": "日志级别",
|
||||
"type": "select",
|
||||
"value": "debug",
|
||||
"description": "日志输出级别",
|
||||
"options": [
|
||||
"debug",
|
||||
"info",
|
||||
"warn",
|
||||
"error"
|
||||
],
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
},
|
||||
{
|
||||
"id": "wait_idle",
|
||||
"type": "wait-action",
|
||||
"name": "闲置等待",
|
||||
"icon": "⏰",
|
||||
"x": 2160,
|
||||
"y": 540,
|
||||
"children": [],
|
||||
"properties": {
|
||||
"waitTime": {
|
||||
"name": "等待时间",
|
||||
"type": "number",
|
||||
"value": 3,
|
||||
"description": "等待时间(秒),必须大于0",
|
||||
"required": true
|
||||
},
|
||||
"useExternalTime": {
|
||||
"name": "使用外部时间",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"description": "是否使用上下文提供的deltaTime,否则使用内部时间计算",
|
||||
"required": false
|
||||
}
|
||||
},
|
||||
"canHaveChildren": false,
|
||||
"canHaveParent": true,
|
||||
"hasError": false
|
||||
}
|
||||
],
|
||||
"connections": [
|
||||
{
|
||||
"id": "root_1-selector_main",
|
||||
"sourceId": "root_1",
|
||||
"targetId": "selector_main",
|
||||
"path": "M 1349.21875 128 C 1349.21875 158 1359.21875 152 1359.21875 182",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "selector_main-repeater_patrol",
|
||||
"sourceId": "selector_main",
|
||||
"targetId": "repeater_patrol",
|
||||
"path": "M 1359.21875 278 C 1359.21875 320 590 320 590 362",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "selector_main-selector_combat",
|
||||
"sourceId": "selector_main",
|
||||
"targetId": "selector_combat",
|
||||
"path": "M 1359.21875 278 C 1359.21875 320 1250 320 1250 362",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "selector_main-sequence_idle",
|
||||
"sourceId": "selector_main",
|
||||
"targetId": "sequence_idle",
|
||||
"path": "M 1359.21875 278 C 1359.21875 320 2019.21875 320 2019.21875 362",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "repeater_patrol-sequence_patrol",
|
||||
"sourceId": "repeater_patrol",
|
||||
"targetId": "sequence_patrol",
|
||||
"path": "M 590 458 C 590 520 590 520 590 582",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_patrol-decorator_patrol_check",
|
||||
"sourceId": "sequence_patrol",
|
||||
"targetId": "decorator_patrol_check",
|
||||
"path": "M 590 678 C 590 720 510 720 510 762",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_patrol-action_patrol",
|
||||
"sourceId": "sequence_patrol",
|
||||
"targetId": "action_patrol",
|
||||
"path": "M 590 678 C 590 720 700 720 700 762",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "decorator_patrol_check-log_patrolling",
|
||||
"sourceId": "decorator_patrol_check",
|
||||
"targetId": "log_patrolling",
|
||||
"path": "M 510 942.078125 C 510 972.078125 480 972 480 1002",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "selector_combat-sequence_attack",
|
||||
"sourceId": "selector_combat",
|
||||
"targetId": "sequence_attack",
|
||||
"path": "M 1250 458 C 1250 500 1030 500 1030 542",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "selector_combat-sequence_defend",
|
||||
"sourceId": "selector_combat",
|
||||
"targetId": "sequence_defend",
|
||||
"path": "M 1250 458 C 1250 500 1470 500 1470 542",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_attack-inverter_enemy",
|
||||
"sourceId": "sequence_attack",
|
||||
"targetId": "inverter_enemy",
|
||||
"path": "M 1030 638 C 1030 680 920 680 920 722",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_attack-action_attack",
|
||||
"sourceId": "sequence_attack",
|
||||
"targetId": "action_attack",
|
||||
"path": "M 1030 638 C 1030 680 1140 680 1140 722",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "inverter_enemy-condition_enemy",
|
||||
"sourceId": "inverter_enemy",
|
||||
"targetId": "condition_enemy",
|
||||
"path": "M 920 798 C 920 840 920 840 920 882",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_defend-wait_defend",
|
||||
"sourceId": "sequence_defend",
|
||||
"targetId": "wait_defend",
|
||||
"path": "M 1470 638 C 1470 680 1360 680 1360 722",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_defend-action_defend",
|
||||
"sourceId": "sequence_defend",
|
||||
"targetId": "action_defend",
|
||||
"path": "M 1470 638 C 1470 680 1580 680 1580 722",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_idle-action_idle",
|
||||
"sourceId": "sequence_idle",
|
||||
"targetId": "action_idle",
|
||||
"path": "M 2019.21875 458 C 2019.21875 500 1800 500 1800 542",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_idle-log_status",
|
||||
"sourceId": "sequence_idle",
|
||||
"targetId": "log_status",
|
||||
"path": "M 2019.21875 458 C 2019.21875 500 2019.21875 500 2019.21875 542",
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": "sequence_idle-wait_idle",
|
||||
"sourceId": "sequence_idle",
|
||||
"targetId": "wait_idle",
|
||||
"path": "M 2019.21875 458 C 2019.21875 500 2238.4375 500 2238.4375 542",
|
||||
"active": false
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"name": "behavior-tree-examples-guide.bt",
|
||||
"created": "2025-06-19T04:28:44.589Z",
|
||||
"version": "1.0"
|
||||
},
|
||||
"blackboard": [
|
||||
{
|
||||
"name": "state",
|
||||
"type": "string",
|
||||
"value": "patrol",
|
||||
"defaultValue": "idle",
|
||||
"description": "当前状态",
|
||||
"group": "核心状态",
|
||||
"readOnly": false,
|
||||
"constraints": {
|
||||
"allowedValues": [
|
||||
"idle",
|
||||
"patrol",
|
||||
"combat",
|
||||
"defend"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "lastAction",
|
||||
"type": "string",
|
||||
"value": "",
|
||||
"defaultValue": "",
|
||||
"description": "最后执行的动作",
|
||||
"group": "核心状态",
|
||||
"readOnly": false,
|
||||
"constraints": {}
|
||||
},
|
||||
{
|
||||
"name": "defendActive",
|
||||
"type": "boolean",
|
||||
"value": false,
|
||||
"defaultValue": false,
|
||||
"description": "是否正在防御",
|
||||
"group": "战斗状态",
|
||||
"readOnly": false,
|
||||
"constraints": {}
|
||||
},
|
||||
{
|
||||
"name": "health",
|
||||
"type": "number",
|
||||
"value": 100,
|
||||
"defaultValue": 100,
|
||||
"description": "生命值",
|
||||
"group": "属性",
|
||||
"readOnly": false,
|
||||
"constraints": {
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"step": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "energy",
|
||||
"type": "number",
|
||||
"value": 50,
|
||||
"defaultValue": 100,
|
||||
"description": "能量值",
|
||||
"group": "属性",
|
||||
"readOnly": false,
|
||||
"constraints": {
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"step": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "ba6c564a-c5c5-4dc7-ba95-9f0279e0bd66",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user