summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-27 18:44:29 +0800
committerchai <chaifix@163.com>2021-01-27 18:44:29 +0800
commit929a152e580cce9bd5aff7fba49a550f70933ef6 (patch)
tree1ac741ff07a1f1a5df56fca5240df3db6266fe14 /Client/Assets/Scripts/XMainClient
parent6ee18886c8af3858de5e97599b23086823d9f320 (diff)
Diffstat (limited to 'Client/Assets/Scripts/XMainClient')
-rw-r--r--Client/Assets/Scripts/XMainClient/AI/AINodeFactory.cs3
-rw-r--r--Client/Assets/Scripts/XMainClient/AI/AIRunTimeBehaviorTree.cs3
-rw-r--r--Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs7
-rw-r--r--Client/Assets/Scripts/XMainClient/XAIComponent.cs1
4 files changed, 12 insertions, 2 deletions
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<string, AIRunTimeNodeBase> _node_dic = new Dictionary<string, AIRunTimeNodeBase>();
+ //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
diff --git a/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs
index 234b0f2c..0d90e4b0 100644
--- a/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs
+++ b/Client/Assets/Scripts/XMainClient/UI/UICommon/DlgBase.cs
@@ -6,6 +6,7 @@ using XUtliPoolLib;
namespace XMainClient.UI.UICommon
{
+ //c 界面逻辑控制器基类
public abstract class DlgBase<TDlgClass, TUIBehaviour> : IXUIDlg, IDlgHandlerMgr where TDlgClass : IXUIDlg, new() where TUIBehaviour : DlgBehaviourBase
{
public static TDlgClass singleton
@@ -580,6 +581,8 @@ namespace XMainClient.UI.UICommon
private void OnLoadUIFinishedEventHandler(string location)
{
+ Debug.Log("加载界面prfab: " + location);
+ //c 加载prefab
GameObject gameObject = XSingleton<XResourceLoaderMgr>.singleton.CreateFromPrefab("UI/" + location, true, false) as GameObject;
bool flag = null != gameObject;
if (flag)
@@ -587,8 +590,8 @@ namespace XMainClient.UI.UICommon
gameObject.transform.parent = XSingleton<UIManager>.singleton.UIRoot;
gameObject.transform.localPosition = new Vector3(0f, 0f, 0f);
gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
- this.m_uiBehaviour = gameObject.AddComponent<TUIBehaviour>();
- this.m_uiBehaviour.uiDlgInterface = this;
+ this.m_uiBehaviour = gameObject.AddComponent<TUIBehaviour>(); //c 这里给界面挂上对应的脚本
+ this.m_uiBehaviour.uiDlgInterface = this;
bool flag2 = !this.m_bBindedReverse;
if (flag2)
{
diff --git a/Client/Assets/Scripts/XMainClient/XAIComponent.cs b/Client/Assets/Scripts/XMainClient/XAIComponent.cs
index a247c12e..0b16b574 100644
--- a/Client/Assets/Scripts/XMainClient/XAIComponent.cs
+++ b/Client/Assets/Scripts/XMainClient/XAIComponent.cs
@@ -6,6 +6,7 @@ using XUtliPoolLib;
namespace XMainClient
{
+ //c AI组件
internal class XAIComponent : XComponent
{
public override uint ID