| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, January 06, 2018 |
| | | // [ Date ]: Tuesday, February 12, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public partial class mapAreaConfig : ConfigBase { |
| | | |
| | | public int AreaID { get ; private set ; } |
| | | public int MapID { get ; private set ; } |
| | | public int StartPosX { get ; private set ; } |
| | | public int StartPosY { get ; private set ; } |
| | | public int EndPosX { get ; private set ; } |
| | | public int EndPosY { get ; private set ; } |
| | | public int AreaName { get ; private set ; } |
| | | public int AreaID; |
| | | public int MapID; |
| | | public int StartPosX; |
| | | public int StartPosY; |
| | | public int EndPosX; |
| | | public int EndPosY; |
| | | public int AreaName; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return AreaID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | public override void Parse(string content) { |
| | | try |
| | | { |
| | | AreaID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | var contents = content.Split('\t'); |
| | | |
| | | int.TryParse(contents[0],out AreaID); |
| | | |
| | | MapID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | int.TryParse(contents[1],out MapID); |
| | | |
| | | StartPosX=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | int.TryParse(contents[2],out StartPosX); |
| | | |
| | | StartPosY=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | | int.TryParse(contents[3],out StartPosY); |
| | | |
| | | EndPosX=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; |
| | | int.TryParse(contents[4],out EndPosX); |
| | | |
| | | EndPosY=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; |
| | | int.TryParse(contents[5],out EndPosY); |
| | | |
| | | AreaName=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; |
| | | int.TryParse(contents[6],out AreaName); |
| | | } |
| | | catch (Exception ex) |
| | | { |