//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Thursday, January 25, 2018
|
//--------------------------------------------------------
|
|
using UnityEngine;
|
using System;
|
|
namespace TableConfig {
|
|
|
public partial class DogzConfig : ConfigBase {
|
|
public int id { get ; private set ; }
|
public string name { get ; private set; }
|
public string HeadIcon { get ; private set; }
|
public int[] propertyTypes;
|
public int[] propertyValues;
|
public int[] skills;
|
public string EquipLimit { get ; private set; }
|
|
public override string getKey()
|
{
|
return id.ToString();
|
}
|
|
public override void Parse() {
|
try
|
{
|
id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
|
name = rawContents[1].Trim();
|
|
HeadIcon = rawContents[2].Trim();
|
|
string[] propertyTypesStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
propertyTypes = new int[propertyTypesStringArray.Length];
|
for (int i=0;i<propertyTypesStringArray.Length;i++)
|
{
|
int.TryParse(propertyTypesStringArray[i],out propertyTypes[i]);
|
}
|
|
string[] propertyValuesStringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
propertyValues = new int[propertyValuesStringArray.Length];
|
for (int i=0;i<propertyValuesStringArray.Length;i++)
|
{
|
int.TryParse(propertyValuesStringArray[i],out propertyValues[i]);
|
}
|
|
string[] skillsStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
skills = new int[skillsStringArray.Length];
|
for (int i=0;i<skillsStringArray.Length;i++)
|
{
|
int.TryParse(skillsStringArray[i],out skills[i]);
|
}
|
|
EquipLimit = rawContents[6].Trim();
|
}
|
catch (Exception ex)
|
{
|
DesignDebug.Log(ex);
|
}
|
}
|
|
}
|
|
}
|