| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, April 20, 2018 |
| | | // [ Date ]: Tuesday, February 12, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public partial class RealmPracticeConfig : ConfigBase { |
| | | |
| | | public int ID { get ; private set ; } |
| | | public int Type { get ; private set ; } |
| | | public string FirstTypeName { get ; private set; } |
| | | public int SecondType { get ; private set ; } |
| | | public string SecondTypeName { get ; private set; } |
| | | public int ID; |
| | | public int Type; |
| | | public string FirstTypeName; |
| | | public int SecondType; |
| | | public string SecondTypeName; |
| | | public int[] AchieveID; |
| | | public int FunctionID { get ; private set ; } |
| | | public string Icon { get ; private set; } |
| | | public int FunctionID; |
| | | public string Icon; |
| | | |
| | | 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); |
| | | |
| | | Type=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | int.TryParse(contents[1],out Type); |
| | | |
| | | FirstTypeName = rawContents[2].Trim(); |
| | | FirstTypeName = contents[2]; |
| | | |
| | | SecondType=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | | int.TryParse(contents[3],out SecondType); |
| | | |
| | | SecondTypeName = rawContents[4].Trim(); |
| | | SecondTypeName = contents[4]; |
| | | |
| | | string[] AchieveIDStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | var AchieveIDStringArray = contents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AchieveID = new int[AchieveIDStringArray.Length]; |
| | | for (int i=0;i<AchieveIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AchieveIDStringArray[i],out AchieveID[i]); |
| | | } |
| | | |
| | | FunctionID=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; |
| | | int.TryParse(contents[6],out FunctionID); |
| | | |
| | | Icon = rawContents[7].Trim(); |
| | | Icon = contents[7]; |
| | | } |
| | | catch (Exception ex) |
| | | { |