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