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/TaskPowerConfig.cs |   90 +++++++++++++++++++++++----------------------
 1 files changed, 46 insertions(+), 44 deletions(-)

diff --git a/Core/GameEngine/Model/Config/TaskPowerConfig.cs b/Core/GameEngine/Model/Config/TaskPowerConfig.cs
index 7db13b5..036728a 100644
--- a/Core/GameEngine/Model/Config/TaskPowerConfig.cs
+++ b/Core/GameEngine/Model/Config/TaskPowerConfig.cs
@@ -1,47 +1,49 @@
-锘�//--------------------------------------------------------
-//    [Author]:			绗簩涓栫晫
-//    [  Date ]:		   Monday, November 26, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-    
-	public partial class TaskPowerConfig : ConfigBase {
-
-		public int ID { get ; private set ; }
-		public int Power { get ; private set ; }
-		public int FabaoID { get ; private set ; }
-		public int ISJUMP { get ; private set ; }
-
-		public override string getKey()
-        {
-            return ID.ToString();
-        }
-
-		public override void Parse() {
-			try
-            {
-                ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; 
+锘�//--------------------------------------------------------
+//    [Author]:			绗簩涓栫晫
+//    [  Date ]:		   Tuesday, February 12, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+    
+	public partial class TaskPowerConfig : ConfigBase {
+
+		public int ID;
+		public int Power;
+		public int FabaoID;
+		public int ISJUMP;
+
+		public override string getKey()
+        {
+            return ID.ToString();
+        }
+
+		public override void Parse(string content) {
+			try
+            {
+                var contents = content.Split('\t');
+
+                int.TryParse(contents[0],out ID);
 			
-				Power=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; 
+				int.TryParse(contents[1],out Power);
 			
-				FabaoID=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; 
+				int.TryParse(contents[2],out FabaoID);
 			
-				ISJUMP=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; 
-            }
-            catch (Exception ex)
-            {
-                DebugEx.Log(ex);
-            }
-		}
-	
-	}
-
-}
-
-
-
-
+				int.TryParse(contents[3],out ISJUMP);
+            }
+            catch (Exception ex)
+            {
+                DebugEx.Log(ex);
+            }
+		}
+	
+	}
+
+}
+
+
+
+

--
Gitblit v1.8.0