| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, May 14, 2018 |
| | | // [ Date ]: Tuesday, February 12, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public partial class TaskListConfig : ConfigBase { |
| | | |
| | | public int TaskID { get ; private set ; } |
| | | public int ChapterID { get ; private set ; } |
| | | public string ChapterName { get ; private set; } |
| | | public string TaskName { get ; private set; } |
| | | public string TaskDescribe { get ; private set; } |
| | | public string TaskRewards { get ; private set; } |
| | | public string TaskTarget { get ; private set; } |
| | | public int TaskID; |
| | | public int ChapterID; |
| | | public string ChapterName; |
| | | public string TaskName; |
| | | public string TaskDescribe; |
| | | public string TaskRewards; |
| | | public string TaskTarget; |
| | | public int[] CollectNPC; |
| | | public int FabaoID { get ; private set ; } |
| | | public int FabaoID; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return TaskID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | public override void Parse(string content) { |
| | | try |
| | | { |
| | | TaskID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | var contents = content.Split('\t'); |
| | | |
| | | int.TryParse(contents[0],out TaskID); |
| | | |
| | | ChapterID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | int.TryParse(contents[1],out ChapterID); |
| | | |
| | | ChapterName = rawContents[2].Trim(); |
| | | ChapterName = contents[2]; |
| | | |
| | | TaskName = rawContents[3].Trim(); |
| | | TaskName = contents[3]; |
| | | |
| | | TaskDescribe = rawContents[4].Trim(); |
| | | TaskDescribe = contents[4]; |
| | | |
| | | TaskRewards = rawContents[5].Trim(); |
| | | TaskRewards = contents[5]; |
| | | |
| | | TaskTarget = rawContents[6].Trim(); |
| | | TaskTarget = contents[6]; |
| | | |
| | | string[] CollectNPCStringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | var CollectNPCStringArray = contents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | CollectNPC = new int[CollectNPCStringArray.Length]; |
| | | for (int i=0;i<CollectNPCStringArray.Length;i++) |
| | | { |
| | | int.TryParse(CollectNPCStringArray[i],out CollectNPC[i]); |
| | | } |
| | | |
| | | FabaoID=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; |
| | | int.TryParse(contents[8],out FabaoID); |
| | | } |
| | | catch (Exception ex) |
| | | { |