//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: 2026年7月2日
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class ActTypeConfig : ConfigBase<int, ActTypeConfig>
|
{
|
static ActTypeConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int CfgID;
|
public int ActFuncType;
|
public int ActTempID;
|
public int JoinFamilyCnt;
|
public int ActShopType;
|
public int ADID;
|
public int[] CTGIDList;
|
public int CTGAssistTempID;
|
public int GuessTempID;
|
public int PersonalTempID;
|
public int FamilyTemplID;
|
|
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 CfgID);
|
|
int.TryParse(tables[1],out ActFuncType);
|
|
int.TryParse(tables[2],out ActTempID);
|
|
int.TryParse(tables[3],out JoinFamilyCnt);
|
|
int.TryParse(tables[4],out ActShopType);
|
|
int.TryParse(tables[5],out ADID);
|
|
if (tables[6].Contains("["))
|
{
|
CTGIDList = JsonMapper.ToObject<int[]>(tables[6]);
|
}
|
else
|
{
|
string[] CTGIDListStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
CTGIDList = new int[CTGIDListStringArray.Length];
|
for (int i=0;i<CTGIDListStringArray.Length;i++)
|
{
|
int.TryParse(CTGIDListStringArray[i],out CTGIDList[i]);
|
}
|
}
|
|
int.TryParse(tables[7],out CTGAssistTempID);
|
|
int.TryParse(tables[8],out GuessTempID);
|
|
int.TryParse(tables[9],out PersonalTempID);
|
|
int.TryParse(tables[10],out FamilyTemplID);
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|