| //--------------------------------------------------------  | 
| //    [Author]:           YYL  | 
| //    [  Date ]:           Monday, September 22, 2025  | 
| //--------------------------------------------------------  | 
|   | 
| using System.Collections.Generic;  | 
| using System;  | 
| using UnityEngine;  | 
| using LitJson;  | 
|   | 
| public partial class GoldRushWorkerConfig : ConfigBase<int, GoldRushWorkerConfig>  | 
| {  | 
|     static GoldRushWorkerConfig()  | 
|     {  | 
|         // 访问过静态构造函数  | 
|         visit = true;   | 
|     }  | 
|   | 
|     public int WorkerID;  | 
|     public string Name;  | 
|     public int PlayerLVUnlock;  | 
|     public int[] MoneyUnlock;  | 
|     public int SkinID;  | 
|   | 
|     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 WorkerID);   | 
|   | 
|             Name = tables[1];  | 
|   | 
|             int.TryParse(tables[2],out PlayerLVUnlock);   | 
|   | 
|             if (tables[3].Contains("[")) | 
|             { | 
|                 MoneyUnlock = JsonMapper.ToObject<int[]>(tables[3]); | 
|             } | 
|             else | 
|             { | 
|                 string[] MoneyUnlockStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); | 
|                 MoneyUnlock = new int[MoneyUnlockStringArray.Length]; | 
|                 for (int i=0;i<MoneyUnlockStringArray.Length;i++) | 
|                 { | 
|                      int.TryParse(MoneyUnlockStringArray[i],out MoneyUnlock[i]); | 
|                 } | 
|             }  | 
|   | 
|             int.TryParse(tables[4],out SkinID);   | 
|         }  | 
|         catch (Exception exception)  | 
|         {  | 
|             Debug.LogError(exception);  | 
|         }  | 
|     }  | 
| }  |