diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/AI/AIRunTimeEntryTaskNode.cs | 62 |
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])));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
|