summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs62
1 files changed, 62 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs
new file mode 100644
index 00000000..1dddd659
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Xml;
+using UnityEngine;
+
+namespace XMainClient
+{
+ internal class AIRunTimeEntryTaskNode : AIRunTimeRootNode
+ {
+ public AIRunTimeEntryTaskNode(XmlElement node) : base(node)
+ {
+ for (int i = 0; i < node.Attributes.Count; i++)
+ {
+ bool flag = node.Attributes[i].Name.Length >= 3;
+ if (flag)
+ {
+ string name = node.Attributes[i].Name.Substring(2);
+ bool flag2 = node.Attributes[i].Name.StartsWith("F_");
+ if (flag2)
+ {
+ base.Data.SetFloatByName(name, float.Parse(node.Attributes[i].Value));
+ }
+ else
+ {
+ bool flag3 = node.Attributes[i].Name.StartsWith("S_");
+ if (flag3)
+ {
+ base.Data.SetStringByName(name, node.Attributes[i].Value);
+ }
+ else
+ {
+ bool flag4 = node.Attributes[i].Name.StartsWith("I_");
+ if (flag4)
+ {
+ base.Data.SetIntByName(name, int.Parse(node.Attributes[i].Value));
+ }
+ else
+ {
+ bool flag5 = node.Attributes[i].Name.StartsWith("B_");
+ if (flag5)
+ {
+ base.Data.SetBoolByName(name, node.Attributes[i].Value != "0");
+ }
+ else
+ {
+ bool flag6 = node.Attributes[i].Name.StartsWith("V_");
+ if (flag6)
+ {
+ string[] array = node.Attributes[i].Value.Split(new char[]
+ {
+ ':'
+ });
+ base.Data.SetVector3ByName(name, new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2])));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}