From 929a152e580cce9bd5aff7fba49a550f70933ef6 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 27 Jan 2021 18:44:29 +0800 Subject: +AI --- Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs | 3 +++ Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs | 3 +++ 2 files changed, 6 insertions(+) (limited to 'Client/Assets/Scripts/XMainClient/AI') diff --git a/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs b/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs index 525f4e19..6a0dd813 100644 --- a/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs +++ b/Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Xml; using XUtliPoolLib; +using UnityEngine; namespace XMainClient { @@ -9,8 +10,10 @@ namespace XMainClient { private static Dictionary _node_dic = new Dictionary(); + //c 根据名称加载对应的AI action public static AIRunTimeNodeBase CreateAINodeByName(string nodeName, XmlElement xmlNode) { + Debug.Log("Behaviour Designer Load: " + nodeName); bool flag = nodeName == "Selector"; AIRunTimeNodeBase result; if (flag) diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs index 56b54daa..11d6ede5 100644 --- a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs +++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs @@ -4,8 +4,10 @@ using XUtliPoolLib; namespace XMainClient { + //c 行为树 internal class AIRunTimeBehaviorTree : IXBehaviorTree, IXInterface { + // 执行这个行为树的实体 public XEntity Host { get @@ -18,6 +20,7 @@ namespace XMainClient } } + // 根节点 public AIRunTimeRootNode Root { get -- cgit v1.1-26-g67d0