| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, November 15, 2018
|
| | | // [ Date ]: Tuesday, February 12, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | |
| | |
|
| | | public partial class MapResourcesConfig : ConfigBase {
|
| | |
|
| | | public int ID { get ; private set ; }
|
| | | public int DataID { get ; private set ; }
|
| | | public int LineID { get ; private set ; }
|
| | | public string Name { get ; private set; } |
| | | public string BigMap { get ; private set; } |
| | | public Vector3 MapScale { get ; private set; } |
| | | public float MapShowScale { get ; private set; } |
| | | public string MapResources { get ; private set; } |
| | | public Vector3 MapOffset { get ; private set; } |
| | | public int ID;
|
| | | public int DataID;
|
| | | public int LineID;
|
| | | public string Name;
|
| | | public string BigMap;
|
| | | public Vector3 MapScale;
|
| | | public float MapShowScale;
|
| | | public string MapResources;
|
| | | public Vector3 MapOffset;
|
| | | public int[] Effect;
|
| | | public int Music { get ; private set ; }
|
| | | public int ShowBOSSTime { get ; private set ; }
|
| | | public int Music;
|
| | | public int ShowBOSSTime;
|
| | |
|
| | | 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);
|
| | |
|
| | | DataID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | int.TryParse(contents[1],out DataID);
|
| | |
|
| | | LineID=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | int.TryParse(contents[2],out LineID);
|
| | |
|
| | | Name = rawContents[3].Trim();
|
| | | Name = contents[3];
|
| | |
|
| | | BigMap = rawContents[4].Trim();
|
| | | BigMap = contents[4];
|
| | |
|
| | | MapScale=rawContents[5].Vector3Parse();
|
| | | MapScale=contents[5].Vector3Parse();
|
| | |
|
| | | MapShowScale=IsNumeric(rawContents[6]) ? float.Parse(rawContents[6]):0; |
| | | float.TryParse(contents[6],out MapShowScale);
|
| | |
|
| | | MapResources = rawContents[7].Trim();
|
| | | MapResources = contents[7];
|
| | |
|
| | | MapOffset=rawContents[8].Vector3Parse();
|
| | | MapOffset=contents[8].Vector3Parse();
|
| | |
|
| | | string[] EffectStringArray = rawContents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | var EffectStringArray = contents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Effect = new int[EffectStringArray.Length]; |
| | | for (int i=0;i<EffectStringArray.Length;i++) |
| | | { |
| | | int.TryParse(EffectStringArray[i],out Effect[i]); |
| | | }
|
| | |
|
| | | Music=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0; |
| | | int.TryParse(contents[10],out Music);
|
| | |
|
| | | ShowBOSSTime=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; |
| | | int.TryParse(contents[11],out ShowBOSSTime);
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|