//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: 2025年10月28日
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class StoreConfig : ConfigBase<int, StoreConfig>
|
{
|
static StoreConfig()
|
{
|
// 访问过静态构造函数
|
visit = true;
|
}
|
|
public int ID;
|
public int ShopType;
|
public int ShopSort;
|
public int ItemID;
|
public int ItemCnt;
|
public int[][] ItemListEx;
|
public int ResetType;
|
public int LimitCnt;
|
public int MoneyType;
|
public int MoneyNum;
|
public int MoneyOriginal;
|
public int UnlockType;
|
public int UnlockValue;
|
|
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 ID);
|
|
int.TryParse(tables[1],out ShopType);
|
|
int.TryParse(tables[2],out ShopSort);
|
|
int.TryParse(tables[3],out ItemID);
|
|
int.TryParse(tables[4],out ItemCnt);
|
|
ItemListEx = JsonMapper.ToObject<int[][]>(tables[5].Replace("(", "[").Replace(")", "]"));
|
|
int.TryParse(tables[6],out ResetType);
|
|
int.TryParse(tables[7],out LimitCnt);
|
|
int.TryParse(tables[8],out MoneyType);
|
|
int.TryParse(tables[9],out MoneyNum);
|
|
int.TryParse(tables[10],out MoneyOriginal);
|
|
int.TryParse(tables[11],out UnlockType);
|
|
int.TryParse(tables[12],out UnlockValue);
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|