//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: Tuesday, January 20, 2026
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class FBDJGLevelConfig : ConfigBase<int, FBDJGLevelConfig>
|
{
|
static FBDJGLevelConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int LevelID;
|
public int LayerNum;
|
public int LevelNum;
|
public int[][] PassAwardList;
|
public int[][] AwardList;
|
public int[] LineupIDList;
|
public long FightPower;
|
public int NPCID;
|
public int[] SkillIDExList;
|
|
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 LayerNum);
|
|
int.TryParse(tables[2],out LevelNum);
|
|
PassAwardList = JsonMapper.ToObject<int[][]>(tables[3].Replace("(", "[").Replace(")", "]"));
|
|
AwardList = JsonMapper.ToObject<int[][]>(tables[4].Replace("(", "[").Replace(")", "]"));
|
|
if (tables[5].Contains("["))
|
{
|
LineupIDList = JsonMapper.ToObject<int[]>(tables[5]);
|
}
|
else
|
{
|
string[] LineupIDListStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
LineupIDList = new int[LineupIDListStringArray.Length];
|
for (int i=0;i<LineupIDListStringArray.Length;i++)
|
{
|
int.TryParse(LineupIDListStringArray[i],out LineupIDList[i]);
|
}
|
}
|
|
long.TryParse(tables[6],out FightPower);
|
|
int.TryParse(tables[7],out NPCID);
|
|
if (tables[8].Contains("["))
|
{
|
SkillIDExList = JsonMapper.ToObject<int[]>(tables[8]);
|
}
|
else
|
{
|
string[] SkillIDExListStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
SkillIDExList = new int[SkillIDExListStringArray.Length];
|
for (int i=0;i<SkillIDExListStringArray.Length;i++)
|
{
|
int.TryParse(SkillIDExListStringArray[i],out SkillIDExList[i]);
|
}
|
}
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|