| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月7日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class MainLevelConfig : ConfigBase<int, MainLevelConfig> |
| | | { |
| | | |
| | | public int LevelID; |
| | | public int ChapterID; |
| | | public int LevelNum; |
| | | public int[] WaveLineupIDList1; |
| | | public int[] WaveLineupIDList2; |
| | | public int[] WaveLineupIDList3; |
| | | public int[] WaveLineupIDList4; |
| | | public int[] WaveLineupIDList5; |
| | | public int[] WaveLineupIDList6; |
| | | public int[] BossLineupIDList; |
| | | public int[][] AwardItemList; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | | int key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | int.TryParse(tables[0],out LevelID); |
| | | |
| | | int.TryParse(tables[1],out ChapterID); |
| | | |
| | | int.TryParse(tables[2],out LevelNum); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class MainLevelConfig : ConfigBase<int, MainLevelConfig>
|
| | | {
|
| | |
|
| | | public int LevelID;
|
| | | public int ChapterID;
|
| | | public int LevelNum;
|
| | | public int[] WaveLineupIDList1;
|
| | | public int[] WaveLineupIDList2;
|
| | | public int[] WaveLineupIDList3;
|
| | | public int[] WaveLineupIDList4;
|
| | | public int[] WaveLineupIDList5;
|
| | | public int[] WaveLineupIDList6;
|
| | | public int[] BossLineupIDList;
|
| | | public int[][] AwardItemList;
|
| | |
|
| | | public override int LoadKey(string _key)
|
| | | {
|
| | | int key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | int.TryParse(tables[0],out LevelID); |
| | |
|
| | | int.TryParse(tables[1],out ChapterID); |
| | |
|
| | | int.TryParse(tables[2],out LevelNum); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | WaveLineupIDList1 = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList1StringArray[i],out WaveLineupIDList1[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | WaveLineupIDList2 = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList2StringArray[i],out WaveLineupIDList2[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[5].Contains("[")) |
| | | { |
| | | WaveLineupIDList3 = JsonMapper.ToObject<int[]>(tables[5]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList3StringArray[i],out WaveLineupIDList3[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[6].Contains("[")) |
| | | { |
| | | WaveLineupIDList4 = JsonMapper.ToObject<int[]>(tables[6]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList4StringArray[i],out WaveLineupIDList4[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[7].Contains("[")) |
| | | { |
| | | WaveLineupIDList5 = JsonMapper.ToObject<int[]>(tables[7]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList5StringArray[i],out WaveLineupIDList5[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[8].Contains("[")) |
| | | { |
| | | WaveLineupIDList6 = JsonMapper.ToObject<int[]>(tables[8]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList6StringArray[i],out WaveLineupIDList6[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[9].Contains("[")) |
| | | { |
| | | BossLineupIDList = JsonMapper.ToObject<int[]>(tables[9]); |
| | |
| | | { |
| | | int.TryParse(BossLineupIDListStringArray[i],out BossLineupIDList[i]); |
| | | } |
| | | } |
| | | |
| | | AwardItemList = JsonMapper.ToObject<int[][]>(tables[10].Replace("(", "[").Replace(")", "]")); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | AwardItemList = JsonMapper.ToObject<int[][]>(tables[10].Replace("(", "[").Replace(")", "]")); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|