From 1aeb815836d84ecfddf761a47862efebbba0ad03 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 12 二月 2019 21:55:16 +0800
Subject: [PATCH] 3335 配置表读取重构。

---
 Core/GameEngine/Model/Config/SkillFrameAnimationConfig.cs |   96 ++++++++++++++++++++++++-----------------------
 1 files changed, 49 insertions(+), 47 deletions(-)

diff --git a/Core/GameEngine/Model/Config/SkillFrameAnimationConfig.cs b/Core/GameEngine/Model/Config/SkillFrameAnimationConfig.cs
index 60d3cd7..bfb2a99 100644
--- a/Core/GameEngine/Model/Config/SkillFrameAnimationConfig.cs
+++ b/Core/GameEngine/Model/Config/SkillFrameAnimationConfig.cs
@@ -1,53 +1,55 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Wednesday, January 23, 2019
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
-	public partial class SkillFrameAnimationConfig : ConfigBase {
-
-		public int skillTypeId { get ; private set ; }
-		public int totalTime { get ; private set ; }
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
+	public partial class SkillFrameAnimationConfig : ConfigBase {
+
+		public int skillTypeId;
+		public int totalTime;
 		public string[] spriteKeys;
-		public string descriptionIcon { get ; private set; } 
-		public Vector3 sizeDelta { get ; private set; } 
-		public Vector3 position { get ; private set; } 
-
-		public override string getKey()
-        {
-            return skillTypeId.ToString();
-        }
-
-		public override void Parse() {
-			try
-            {
-                skillTypeId=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+		public string descriptionIcon;
+		public Vector3 sizeDelta;
+		public Vector3 position;
+
+		public override string getKey()
+        {
+            return skillTypeId.ToString();
+        }
+
+		public override void Parse(string content) {
+			try
+            {
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out skillTypeId);
 			
-				totalTime=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
+				int.TryParse(contents[1],out totalTime);
 			
-				spriteKeys = rawContents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+				spriteKeys = contents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
 			
-				descriptionIcon = rawContents[3].Trim();
+				descriptionIcon = contents[3];
 			
-				sizeDelta=rawContents[4].Vector3Parse();
+				sizeDelta=contents[4].Vector3Parse();
 			
-				position=rawContents[5].Vector3Parse();
-            }
-            catch (Exception ex)
-            {
-                DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+				position=contents[5].Vector3Parse();
+            }
+            catch (Exception ex)
+            {
+                DebugEx.Log(ex);
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0