//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Tuesday, February 12, 2019
|
//--------------------------------------------------------
|
|
using UnityEngine;
|
using System;
|
|
namespace TableConfig {
|
|
|
public partial class GuideConfig : ConfigBase {
|
|
public int ID;
|
public int Type;
|
public int TriggerType;
|
public int Condition;
|
public int PreGuideId;
|
public int[] Steps;
|
public int CanSkip;
|
public int RemoveWhenOtherGuide;
|
public int CannotCompleteByClick;
|
|
public override string getKey()
|
{
|
return ID.ToString();
|
}
|
|
public override void Parse(string content) {
|
try
|
{
|
var contents = content.Split('\t');
|
|
int.TryParse(contents[0],out ID);
|
|
int.TryParse(contents[1],out Type);
|
|
int.TryParse(contents[2],out TriggerType);
|
|
int.TryParse(contents[3],out Condition);
|
|
int.TryParse(contents[4],out PreGuideId);
|
|
var StepsStringArray = contents[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]);
|
}
|
|
int.TryParse(contents[6],out CanSkip);
|
|
int.TryParse(contents[7],out RemoveWhenOtherGuide);
|
|
int.TryParse(contents[8],out CannotCompleteByClick);
|
}
|
catch (Exception ex)
|
{
|
DebugEx.Log(ex);
|
}
|
}
|
|
}
|
|
}
|
|
|
|
|