//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Tuesday, February 12, 2019
|
//--------------------------------------------------------
|
|
using UnityEngine;
|
using System;
|
|
namespace TableConfig {
|
|
|
public partial class GodWeaponConfig : ConfigBase {
|
|
public int ID;
|
public int Type;
|
public string Name;
|
public int Lv;
|
public int NeedExp;
|
public int[] AttrType;
|
public int[] AttrNum;
|
public int SkillID;
|
|
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);
|
|
Name = contents[2];
|
|
int.TryParse(contents[3],out Lv);
|
|
int.TryParse(contents[4],out NeedExp);
|
|
var AttrTypeStringArray = contents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
AttrType = new int[AttrTypeStringArray.Length];
|
for (int i=0;i<AttrTypeStringArray.Length;i++)
|
{
|
int.TryParse(AttrTypeStringArray[i],out AttrType[i]);
|
}
|
|
var AttrNumStringArray = contents[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
AttrNum = new int[AttrNumStringArray.Length];
|
for (int i=0;i<AttrNumStringArray.Length;i++)
|
{
|
int.TryParse(AttrNumStringArray[i],out AttrNum[i]);
|
}
|
|
int.TryParse(contents[7],out SkillID);
|
}
|
catch (Exception ex)
|
{
|
DebugEx.Log(ex);
|
}
|
}
|
|
}
|
|
}
|