//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Saturday, August 11, 2018
|
//--------------------------------------------------------
|
|
using UnityEngine;
|
using System;
|
|
namespace TableConfig {
|
|
|
public partial class GuideConfig : ConfigBase {
|
|
public int ID { get ; private set ; }
|
public int Type { get ; private set ; }
|
public int TriggerType { get ; private set ; }
|
public int Condition { get ; private set ; }
|
public int PreGuideId { get ; private set ; }
|
public int[] Steps;
|
public int CanSkip { get ; private set ; }
|
public int RemoveWhenOtherGuide { get ; private set ; }
|
public int CannotCompleteByClick { get ; private set ; }
|
|
public override string getKey()
|
{
|
return ID.ToString();
|
}
|
|
public override void Parse() {
|
try
|
{
|
ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
|
Type=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
|
|
TriggerType=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
|
|
Condition=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
|
|
PreGuideId=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
|
|
string[] StepsStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
Steps = new int[StepsStringArray.Length];
|
for (int i=0;i<StepsStringArray.Length;i++)
|
{
|
int.TryParse(StepsStringArray[i],out Steps[i]);
|
}
|
|
CanSkip=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0;
|
|
RemoveWhenOtherGuide=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0;
|
|
CannotCompleteByClick=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0;
|
}
|
catch (Exception ex)
|
{
|
DebugEx.Log(ex);
|
}
|
}
|
|
}
|
|
}
|