| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月13日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class HeroSkinConfig : ConfigBase<int, HeroSkinConfig> |
| | | { |
| | | |
| | | public int SkinNPCID; |
| | | public int[] WearAttrIDList; |
| | | public int[] WearAttrValueList; |
| | | public int[] AllBatAttrIDList; |
| | | public int[] AllBatAttrValueList; |
| | | |
| | | 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 SkinNPCID); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年8月4日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroSkinConfig : ConfigBase<int, HeroSkinConfig>
|
| | | {
|
| | | static HeroSkinConfig()
|
| | | {
|
| | | if (isInit)
|
| | | {
|
| | | return;
|
| | | }
|
| | | LazyInit();
|
| | | }
|
| | |
|
| | | public int SkinID;
|
| | | public int[] WearAttrIDList;
|
| | | public int[] WearAttrValueList;
|
| | | public int[] AllBatAttrIDList;
|
| | | public int[] AllBatAttrValueList;
|
| | | public string Tachie;
|
| | | public string SquareIcon;
|
| | | public string RectangleIcon;
|
| | | public string SpineRes;
|
| | |
|
| | | 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); |
| | |
|
| | | if (tables[1].Contains("[")) |
| | | { |
| | | WearAttrIDList = JsonMapper.ToObject<int[]>(tables[1]); |
| | |
| | | { |
| | | int.TryParse(WearAttrIDListStringArray[i],out WearAttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[2].Contains("[")) |
| | | { |
| | | WearAttrValueList = JsonMapper.ToObject<int[]>(tables[2]); |
| | |
| | | { |
| | | int.TryParse(WearAttrValueListStringArray[i],out WearAttrValueList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AllBatAttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(AllBatAttrIDListStringArray[i],out AllBatAttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AllBatAttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(AllBatAttrValueListStringArray[i],out AllBatAttrValueList[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | Tachie = tables[5];
|
| | |
|
| | | SquareIcon = tables[6];
|
| | |
|
| | | RectangleIcon = tables[7];
|
| | |
|
| | | SpineRes = tables[8];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|