//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Monday, May 14, 2018
|
//--------------------------------------------------------
|
|
using UnityEngine;
|
using System;
|
|
namespace TableConfig {
|
|
|
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[] CollectNPC;
|
public int FabaoID { get ; private set ; }
|
|
public override string getKey()
|
{
|
return TaskID.ToString();
|
}
|
|
public override void Parse() {
|
try
|
{
|
TaskID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
|
ChapterID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
|
|
ChapterName = rawContents[2].Trim();
|
|
TaskName = rawContents[3].Trim();
|
|
TaskDescribe = rawContents[4].Trim();
|
|
TaskRewards = rawContents[5].Trim();
|
|
TaskTarget = rawContents[6].Trim();
|
|
string[] CollectNPCStringArray = rawContents[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;
|
}
|
catch (Exception ex)
|
{
|
DebugEx.Log(ex);
|
}
|
}
|
|
}
|
|
}
|