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/SysInfoConfig.cs |   74 +++++++++++++++++++------------------
 1 files changed, 38 insertions(+), 36 deletions(-)

diff --git a/Core/GameEngine/Model/Config/SysInfoConfig.cs b/Core/GameEngine/Model/Config/SysInfoConfig.cs
index 2a6db36..8687dc8 100644
--- a/Core/GameEngine/Model/Config/SysInfoConfig.cs
+++ b/Core/GameEngine/Model/Config/SysInfoConfig.cs
@@ -1,58 +1,60 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Monday, March 19, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
 	public partial class SysInfoConfig : ConfigBase {
 
-		public string key { get ; private set; } 
-		public string sound { get ; private set; } 
-		public string effect { get ; private set; } 
+		public string key;
+		public string sound;
+		public string effect;
 		public int[] type;
-		public string richText { get ; private set; } 
-		public int order { get ; private set ; }
-
+		public string richText;
+		public int order;
+
 		public override string getKey()
         {
             return key.ToString();
-        }
-
-		public override void Parse() {
+        }
+
+		public override void Parse(string content) {
 			try
             {
-                key = rawContents[0].Trim();
+                var contents = content.Split('\t');
+
+                key = contents[0];
 			
-				sound = rawContents[1].Trim();
+				sound = contents[1];
 			
-				effect = rawContents[2].Trim();
+				effect = contents[2];
 			
-				string[] typeStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+				var typeStringArray = contents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
 				type = new int[typeStringArray.Length];
 				for (int i=0;i<typeStringArray.Length;i++)
 				{
 					 int.TryParse(typeStringArray[i],out type[i]);
 				}
 			
-				richText = rawContents[4].Trim();
+				richText = contents[4];
 			
-				order=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; 
+				int.TryParse(contents[5],out order);
             }
             catch (Exception ex)
             {
                 DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0