| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, January 25, 2018 |
| | | // [ Date ]: Friday, August 17, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | 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 int ID { get ; private set ; }
|
| | | public string Name { get ; private set; } |
| | | public string HeadIcon { get ; private set; } |
| | | public int[] BaseAttrTypes;
|
| | | public int[] BaseAttrValues;
|
| | | public int[] HelpBattleSkills;
|
| | | public int[] EquipPlaceColorList; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return id.ToString(); |
| | | 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++) |
| | | ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | Name = rawContents[1].Trim();
|
| | | |
| | | HeadIcon = rawContents[2].Trim();
|
| | | |
| | | string[] BaseAttrTypesStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | BaseAttrTypes = new int[BaseAttrTypesStringArray.Length]; |
| | | for (int i=0;i<BaseAttrTypesStringArray.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(BaseAttrTypesStringArray[i],out BaseAttrTypes[i]); |
| | | }
|
| | | |
| | | string[] BaseAttrValuesStringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | BaseAttrValues = new int[BaseAttrValuesStringArray.Length]; |
| | | for (int i=0;i<BaseAttrValuesStringArray.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(BaseAttrValuesStringArray[i],out BaseAttrValues[i]); |
| | | }
|
| | | |
| | | string[] HelpBattleSkillsStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | HelpBattleSkills = new int[HelpBattleSkillsStringArray.Length]; |
| | | for (int i=0;i<HelpBattleSkillsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(skillsStringArray[i],out skills[i]); |
| | | int.TryParse(HelpBattleSkillsStringArray[i],out HelpBattleSkills[i]); |
| | | }
|
| | | |
| | | string[] EquipPlaceColorListStringArray = rawContents[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | EquipPlaceColorList = new int[EquipPlaceColorListStringArray.Length]; |
| | | for (int i=0;i<EquipPlaceColorListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(EquipPlaceColorListStringArray[i],out EquipPlaceColorList[i]); |
| | | } |
| | | |
| | | EquipLimit = rawContents[6].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |