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/DungeonHelpBattleConfig.cs | 102 ++++++++++++++++++++++++++-------------------------
1 files changed, 52 insertions(+), 50 deletions(-)
diff --git a/Core/GameEngine/Model/Config/DungeonHelpBattleConfig.cs b/Core/GameEngine/Model/Config/DungeonHelpBattleConfig.cs
index 2ccc4c5..76dba0a 100644
--- a/Core/GameEngine/Model/Config/DungeonHelpBattleConfig.cs
+++ b/Core/GameEngine/Model/Config/DungeonHelpBattleConfig.cs
@@ -1,56 +1,58 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Friday, November 23, 2018
-//--------------------------------------------------------
-
-using UnityEngine;
-using System;
-
-namespace TableConfig {
-
-
- public partial class DungeonHelpBattleConfig : ConfigBase {
-
- public int ID { get ; private set ; }
- public int DataMapID { get ; private set ; }
- public int LineID { get ; private set ; }
- public int RobotFightPower { get ; private set ; }
- public int RobotLV { get ; private set ; }
- public int RobotRealmLV { get ; private set ; }
- public string RobotCloth { 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 DungeonHelpBattleConfig : ConfigBase {
+
+ public int ID;
+ public int DataMapID;
+ public int LineID;
+ public int RobotFightPower;
+ public int RobotLV;
+ public int RobotRealmLV;
+ public string RobotCloth;
+
+ 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);
- DataMapID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+ int.TryParse(contents[1],out DataMapID);
- LineID=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+ int.TryParse(contents[2],out LineID);
- RobotFightPower=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
+ int.TryParse(contents[3],out RobotFightPower);
- RobotLV=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
+ int.TryParse(contents[4],out RobotLV);
- RobotRealmLV=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0;
+ int.TryParse(contents[5],out RobotRealmLV);
- RobotCloth = rawContents[6].Trim();
- }
- catch (Exception ex)
- {
- DebugEx.Log(ex);
- }
- }
-
- }
-
-}
-
-
-
-
+ RobotCloth = contents[6];
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
--
Gitblit v1.8.0