| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, January 06, 2018 |
| | | // [ Date ]: Tuesday, February 12, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public partial class RuneConfig : ConfigBase { |
| | | |
| | | public int ID { get ; private set ; } |
| | | public int ID; |
| | | public int[] AttrType; |
| | | public int TowerID { get ; private set ; } |
| | | public int TowerID; |
| | | |
| | | 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); |
| | | |
| | | string[] AttrTypeStringArray = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | var AttrTypeStringArray = contents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AttrType = new int[AttrTypeStringArray.Length]; |
| | | for (int i=0;i<AttrTypeStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AttrTypeStringArray[i],out AttrType[i]); |
| | | } |
| | | |
| | | TowerID=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | int.TryParse(contents[2],out TowerID); |
| | | } |
| | | catch (Exception ex) |
| | | { |