| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: Friday, June 27, 2025 |
| | | //-------------------------------------------------------- |
| | | |
| | | 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); |
| | | |
| | | if (tables[1].Contains("[")) |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2026年3月13日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroSkinConfig : ConfigBase<int, HeroSkinConfig>
|
| | | {
|
| | | static HeroSkinConfig()
|
| | | {
|
| | | // 访问过静态构造函数
|
| | | visit = true; |
| | | }
|
| | |
|
| | | public int SkinID;
|
| | | public string SkinName;
|
| | | public string BG;
|
| | | public int AudioID;
|
| | | public string Tachie;
|
| | | public float[] TachieParam;
|
| | | public string SquareIcon;
|
| | | public string RectangleIcon;
|
| | | public string CardPic;
|
| | | public string SpineRes;
|
| | | public string InitialSkinName;
|
| | | public string ApearMotionName;
|
| | | public string TransfMotionName;
|
| | | public string LoopMotionName;
|
| | |
|
| | | 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); |
| | |
|
| | | SkinName = tables[1];
|
| | |
|
| | | BG = tables[2];
|
| | |
|
| | | int.TryParse(tables[3],out AudioID); |
| | |
|
| | | Tachie = tables[4];
|
| | |
|
| | | if (tables[5].Contains("[")) |
| | | { |
| | | WearAttrIDList = JsonMapper.ToObject<int[]>(tables[1]); |
| | | TachieParam = JsonMapper.ToObject<float[]>(tables[5]); |
| | | } |
| | | else |
| | | { |
| | | string[] WearAttrIDListStringArray = tables[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | WearAttrIDList = new int[WearAttrIDListStringArray.Length]; |
| | | for (int i=0;i<WearAttrIDListStringArray.Length;i++) |
| | | string[] TachieParamStringArray = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | TachieParam = new float[TachieParamStringArray.Length]; |
| | | for (int i=0;i<TachieParamStringArray.Length;i++) |
| | | { |
| | | int.TryParse(WearAttrIDListStringArray[i],out WearAttrIDList[i]); |
| | | float.TryParse(TachieParamStringArray[i],out TachieParam[i]); |
| | | } |
| | | } |
| | | |
| | | if (tables[2].Contains("[")) |
| | | { |
| | | WearAttrValueList = JsonMapper.ToObject<int[]>(tables[2]); |
| | | } |
| | | else |
| | | { |
| | | string[] WearAttrValueListStringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | WearAttrValueList = new int[WearAttrValueListStringArray.Length]; |
| | | for (int i=0;i<WearAttrValueListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(WearAttrValueListStringArray[i],out WearAttrValueList[i]); |
| | | } |
| | | } |
| | | |
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AllBatAttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] AllBatAttrIDListStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AllBatAttrIDList = new int[AllBatAttrIDListStringArray.Length]; |
| | | for (int i=0;i<AllBatAttrIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AllBatAttrIDListStringArray[i],out AllBatAttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AllBatAttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | | } |
| | | else |
| | | { |
| | | string[] AllBatAttrValueListStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AllBatAttrValueList = new int[AllBatAttrValueListStringArray.Length]; |
| | | for (int i=0;i<AllBatAttrValueListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AllBatAttrValueListStringArray[i],out AllBatAttrValueList[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | SquareIcon = tables[6];
|
| | |
|
| | | RectangleIcon = tables[7];
|
| | |
|
| | | CardPic = tables[8];
|
| | |
|
| | | SpineRes = tables[9];
|
| | |
|
| | | InitialSkinName = tables[10];
|
| | |
|
| | | ApearMotionName = tables[11];
|
| | |
|
| | | TransfMotionName = tables[12];
|
| | |
|
| | | LoopMotionName = tables[13];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|