| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Sunday, April 08, 2018 |
| | | // [ Date ]: Tuesday, February 12, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public partial class RoleStrongerConfig : ConfigBase { |
| | | |
| | | public int id { get ; private set ; } |
| | | public int funcType { get ; private set ; } |
| | | public string Name { get ; private set; } |
| | | public int funcId { get ; private set ; } |
| | | public int LV { get ; private set ; } |
| | | public int id; |
| | | public int funcType; |
| | | public string Name; |
| | | public int funcId; |
| | | public int LV; |
| | | public int[] conditions; |
| | | public int targetValue { get ; private set ; } |
| | | public int recommendFightPower { get ; private set ; } |
| | | public int strongerFightPower { get ; private set ; } |
| | | public string title { get ; private set; } |
| | | public string desc { get ; private set; } |
| | | public string Icon { get ; private set; } |
| | | public int OpenUI { get ; private set ; } |
| | | public int targetValue; |
| | | public int recommendFightPower; |
| | | public int strongerFightPower; |
| | | public string title; |
| | | public string desc; |
| | | public string Icon; |
| | | public int OpenUI; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return id.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | public override void Parse(string content) { |
| | | try |
| | | { |
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | var contents = content.Split('\t'); |
| | | |
| | | int.TryParse(contents[0],out id); |
| | | |
| | | funcType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | int.TryParse(contents[1],out funcType); |
| | | |
| | | Name = rawContents[2].Trim(); |
| | | Name = contents[2]; |
| | | |
| | | funcId=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | | int.TryParse(contents[3],out funcId); |
| | | |
| | | LV=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; |
| | | int.TryParse(contents[4],out LV); |
| | | |
| | | string[] conditionsStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | var conditionsStringArray = contents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | conditions = new int[conditionsStringArray.Length]; |
| | | for (int i=0;i<conditionsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(conditionsStringArray[i],out conditions[i]); |
| | | } |
| | | |
| | | targetValue=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; |
| | | int.TryParse(contents[6],out targetValue); |
| | | |
| | | recommendFightPower=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; |
| | | int.TryParse(contents[7],out recommendFightPower); |
| | | |
| | | strongerFightPower=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; |
| | | int.TryParse(contents[8],out strongerFightPower); |
| | | |
| | | title = rawContents[9].Trim(); |
| | | title = contents[9]; |
| | | |
| | | desc = rawContents[10].Trim(); |
| | | desc = contents[10]; |
| | | |
| | | Icon = rawContents[11].Trim(); |
| | | Icon = contents[11]; |
| | | |
| | | OpenUI=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; |
| | | int.TryParse(contents[12],out OpenUI); |
| | | } |
| | | catch (Exception ex) |
| | | { |