summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs
new file mode 100644
index 00000000..18151d0f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeSelectMoveTargetById.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Xml;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class AIRunTimeSelectMoveTargetById : AIRunTimeNodeAction
+ {
+ private int _object_id;
+
+ private string _target_name;
+
+ public AIRunTimeSelectMoveTargetById(XmlElement node) : base(node)
+ {
+ this._object_id = int.Parse(node.GetAttribute("ObjectId"));
+ this._target_name = node.GetAttribute("Shared_MoveTarget");
+ }
+
+ public override bool Update(XEntity entity)
+ {
+ XGameObject xgameObject = XSingleton<XAITarget>.singleton.SelectMoveTargetById(entity, this._object_id);
+ bool flag = xgameObject == null;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ entity.AI.AIData.SetXGameObjectByName(this._target_name, xgameObject);
+ result = true;
+ }
+ return result;
+ }
+ }
+}