//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: 2025年12月21日
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class BeautySkinConfig : ConfigBase<int, BeautySkinConfig>
|
{
|
static BeautySkinConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int SkinID;
|
public int BeautyID;
|
public int UnlockWay;
|
public int UnlockValue;
|
public int UnlockNeedCnt;
|
public int UpNeedCnt;
|
public int StarMax;
|
public int[] AttrIDList;
|
public int[] InitAttrValueList;
|
public int[] AttrPerStarAddList;
|
public string HeadIcon;
|
public string SmallRole;
|
public string BigRole;
|
|
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 SkinID);
|
|
int.TryParse(tables[1],out BeautyID);
|
|
int.TryParse(tables[2],out UnlockWay);
|
|
int.TryParse(tables[3],out UnlockValue);
|
|
int.TryParse(tables[4],out UnlockNeedCnt);
|
|
int.TryParse(tables[5],out UpNeedCnt);
|
|
int.TryParse(tables[6],out StarMax);
|
|
if (tables[7].Contains("["))
|
{
|
AttrIDList = JsonMapper.ToObject<int[]>(tables[7]);
|
}
|
else
|
{
|
string[] AttrIDListStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
AttrIDList = new int[AttrIDListStringArray.Length];
|
for (int i=0;i<AttrIDListStringArray.Length;i++)
|
{
|
int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]);
|
}
|
}
|
|
if (tables[8].Contains("["))
|
{
|
InitAttrValueList = JsonMapper.ToObject<int[]>(tables[8]);
|
}
|
else
|
{
|
string[] InitAttrValueListStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
InitAttrValueList = new int[InitAttrValueListStringArray.Length];
|
for (int i=0;i<InitAttrValueListStringArray.Length;i++)
|
{
|
int.TryParse(InitAttrValueListStringArray[i],out InitAttrValueList[i]);
|
}
|
}
|
|
if (tables[9].Contains("["))
|
{
|
AttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[9]);
|
}
|
else
|
{
|
string[] AttrPerStarAddListStringArray = tables[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
AttrPerStarAddList = new int[AttrPerStarAddListStringArray.Length];
|
for (int i=0;i<AttrPerStarAddListStringArray.Length;i++)
|
{
|
int.TryParse(AttrPerStarAddListStringArray[i],out AttrPerStarAddList[i]);
|
}
|
}
|
|
HeadIcon = tables[10];
|
|
SmallRole = tables[11];
|
|
BigRole = tables[12];
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|