| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, January 06, 2018 |
| | | // [ Date ]: Tuesday, February 12, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public partial class RuneComposeConfig : ConfigBase { |
| | | |
| | | public int TagItemID { get ; private set ; } |
| | | public int TagItemID; |
| | | public int[] NeedItem; |
| | | public int NeedMJ { get ; private set ; } |
| | | public int NeedMJ; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return TagItemID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | public override void Parse(string content) { |
| | | try |
| | | { |
| | | TagItemID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | var contents = content.Split('\t'); |
| | | |
| | | int.TryParse(contents[0],out TagItemID); |
| | | |
| | | string[] NeedItemStringArray = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | var NeedItemStringArray = contents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NeedItem = new int[NeedItemStringArray.Length]; |
| | | for (int i=0;i<NeedItemStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NeedItemStringArray[i],out NeedItem[i]); |
| | | } |
| | | |
| | | NeedMJ=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | int.TryParse(contents[2],out NeedMJ); |
| | | } |
| | | catch (Exception ex) |
| | | { |