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/LoadingBackGroundConfig.cs | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/Core/GameEngine/Model/Config/LoadingBackGroundConfig.cs b/Core/GameEngine/Model/Config/LoadingBackGroundConfig.cs
index 06f4eae..348d662 100644
--- a/Core/GameEngine/Model/Config/LoadingBackGroundConfig.cs
+++ b/Core/GameEngine/Model/Config/LoadingBackGroundConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: 绗簩涓栫晫
-// [ Date ]: Saturday, November 24, 2018
+// [ Date ]: Tuesday, February 12, 2019
//--------------------------------------------------------
using UnityEngine;
@@ -11,32 +11,34 @@
public partial class LoadingBackGroundConfig : ConfigBase {
- public int id { get ; private set ; }
- public int lineId { get ; private set ; }
+ public int id;
+ public int lineId;
public string[] icons;
- public string levelLimit { get ; private set; }
- public string name { get ; private set; }
- public string description { get ; private set; }
+ public string levelLimit;
+ public string name;
+ public string description;
public override string getKey()
{
return id.ToString();
}
- public override void Parse() {
+ public override void Parse(string content) {
try
{
- id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+ var contents = content.Split('\t');
+
+ int.TryParse(contents[0],out id);
- lineId=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+ int.TryParse(contents[1],out lineId);
- icons = rawContents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ icons = contents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
- levelLimit = rawContents[3].Trim();
+ levelLimit = contents[3];
- name = rawContents[4].Trim();
+ name = contents[4];
- description = rawContents[5].Trim();
+ description = contents[5];
}
catch (Exception ex)
{
--
Gitblit v1.8.0