| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年12月1日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class ChatBubbleBoxConfig : ConfigBase<int, ChatBubbleBoxConfig>
|
| | | {
|
| | | static ChatBubbleBoxConfig()
|
| | | {
|
| | | // 访问过静态构造函数
|
| | | visit = true; |
| | | }
|
| | |
|
| | | public int ID;
|
| | | public string Name;
|
| | | public int NeedLV;
|
| | | public int SortNum;
|
| | | public int UnlockDefault;
|
| | | public int ResourceType;
|
| | | public string ResourceValue;
|
| | | public int ExpireMinutes;
|
| | | public int[][] UnlockNeedItemList;
|
| | | public int[] LightAttrType;
|
| | | public int[] LightAttrValue;
|
| | | public int LightFightPower;
|
| | | public string leftBubbleIcon;
|
| | | public string rightBubbleIcon;
|
| | | public int[] leftOffset;
|
| | | public int[] rightOffset;
|
| | | public string Icon;
|
| | | public int Jump;
|
| | | public string GainTip;
|
| | | public int[] color;
|
| | | public int top;
|
| | | public string Descriptive;
|
| | | public int UnlockWay;
|
| | | public int UnlockValue;
|
| | | public int UnlockNeedCnt;
|
| | | public int UpNeedCnt;
|
| | | public int StarMax;
|
| | | public int[] AttrIDList;
|
| | | public int[] InitAttrValueList;
|
| | | public int[] AttrPerStarAddList;
|
| | | public string GetWayString;
|
| | | public int[] LeftOffset;
|
| | | public int[] RightOffset;
|
| | | public int Top;
|
| | | public int[] MyColor;
|
| | | public int[] OtherColor;
|
| | |
|
| | | public override int LoadKey(string _key)
|
| | | {
|
| | |
| | |
|
| | | Name = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out NeedLV); |
| | | int.TryParse(tables[2],out ResourceType); |
| | |
|
| | | int.TryParse(tables[3],out SortNum); |
| | | ResourceValue = tables[3];
|
| | |
|
| | | int.TryParse(tables[4],out UnlockDefault); |
| | | int.TryParse(tables[4],out ExpireMinutes); |
| | |
|
| | | int.TryParse(tables[5],out ExpireMinutes); |
| | | int.TryParse(tables[5],out UnlockWay); |
| | |
|
| | | UnlockNeedItemList = JsonMapper.ToObject<int[][]>(tables[6].Replace("(", "[").Replace(")", "]")); |
| | | int.TryParse(tables[6],out UnlockValue); |
| | |
|
| | | if (tables[7].Contains("[")) |
| | | int.TryParse(tables[7],out UnlockNeedCnt); |
| | |
|
| | | int.TryParse(tables[8],out UpNeedCnt); |
| | |
|
| | | int.TryParse(tables[9],out StarMax); |
| | |
|
| | | if (tables[10].Contains("[")) |
| | | { |
| | | LightAttrType = JsonMapper.ToObject<int[]>(tables[7]); |
| | | AttrIDList = JsonMapper.ToObject<int[]>(tables[10]); |
| | | } |
| | | else |
| | | { |
| | | string[] LightAttrTypeStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | LightAttrType = new int[LightAttrTypeStringArray.Length]; |
| | | for (int i=0;i<LightAttrTypeStringArray.Length;i++) |
| | | string[] AttrIDListStringArray = tables[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AttrIDList = new int[AttrIDListStringArray.Length]; |
| | | for (int i=0;i<AttrIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(LightAttrTypeStringArray[i],out LightAttrType[i]); |
| | | int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]); |
| | | } |
| | | }
|
| | |
|
| | | if (tables[8].Contains("[")) |
| | | if (tables[11].Contains("[")) |
| | | { |
| | | LightAttrValue = JsonMapper.ToObject<int[]>(tables[8]); |
| | | InitAttrValueList = JsonMapper.ToObject<int[]>(tables[11]); |
| | | } |
| | | else |
| | | { |
| | | string[] LightAttrValueStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | LightAttrValue = new int[LightAttrValueStringArray.Length]; |
| | | for (int i=0;i<LightAttrValueStringArray.Length;i++) |
| | | string[] InitAttrValueListStringArray = tables[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | InitAttrValueList = new int[InitAttrValueListStringArray.Length]; |
| | | for (int i=0;i<InitAttrValueListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(LightAttrValueStringArray[i],out LightAttrValue[i]); |
| | | int.TryParse(InitAttrValueListStringArray[i],out InitAttrValueList[i]); |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[9],out LightFightPower); |
| | |
|
| | | leftBubbleIcon = tables[10];
|
| | |
|
| | | rightBubbleIcon = tables[11];
|
| | |
|
| | | if (tables[12].Contains("[")) |
| | | { |
| | | leftOffset = JsonMapper.ToObject<int[]>(tables[12]); |
| | | AttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[12]); |
| | | } |
| | | else |
| | | { |
| | | string[] leftOffsetStringArray = tables[12].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | leftOffset = new int[leftOffsetStringArray.Length]; |
| | | for (int i=0;i<leftOffsetStringArray.Length;i++) |
| | | string[] AttrPerStarAddListStringArray = tables[12].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AttrPerStarAddList = new int[AttrPerStarAddListStringArray.Length]; |
| | | for (int i=0;i<AttrPerStarAddListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(leftOffsetStringArray[i],out leftOffset[i]); |
| | | int.TryParse(AttrPerStarAddListStringArray[i],out AttrPerStarAddList[i]); |
| | | } |
| | | }
|
| | |
|
| | | if (tables[13].Contains("[")) |
| | | GetWayString = tables[13];
|
| | |
|
| | | if (tables[14].Contains("[")) |
| | | { |
| | | rightOffset = JsonMapper.ToObject<int[]>(tables[13]); |
| | | LeftOffset = JsonMapper.ToObject<int[]>(tables[14]); |
| | | } |
| | | else |
| | | { |
| | | string[] rightOffsetStringArray = tables[13].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rightOffset = new int[rightOffsetStringArray.Length]; |
| | | for (int i=0;i<rightOffsetStringArray.Length;i++) |
| | | string[] LeftOffsetStringArray = tables[14].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | LeftOffset = new int[LeftOffsetStringArray.Length]; |
| | | for (int i=0;i<LeftOffsetStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rightOffsetStringArray[i],out rightOffset[i]); |
| | | int.TryParse(LeftOffsetStringArray[i],out LeftOffset[i]); |
| | | } |
| | | }
|
| | |
|
| | | Icon = tables[14];
|
| | | if (tables[15].Contains("[")) |
| | | { |
| | | RightOffset = JsonMapper.ToObject<int[]>(tables[15]); |
| | | } |
| | | else |
| | | { |
| | | string[] RightOffsetStringArray = tables[15].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RightOffset = new int[RightOffsetStringArray.Length]; |
| | | for (int i=0;i<RightOffsetStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RightOffsetStringArray[i],out RightOffset[i]); |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[15],out Jump); |
| | |
|
| | | GainTip = tables[16];
|
| | | int.TryParse(tables[16],out Top); |
| | |
|
| | | if (tables[17].Contains("[")) |
| | | { |
| | | color = JsonMapper.ToObject<int[]>(tables[17]); |
| | | MyColor = JsonMapper.ToObject<int[]>(tables[17]); |
| | | } |
| | | else |
| | | { |
| | | string[] colorStringArray = tables[17].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | color = new int[colorStringArray.Length]; |
| | | for (int i=0;i<colorStringArray.Length;i++) |
| | | string[] MyColorStringArray = tables[17].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | MyColor = new int[MyColorStringArray.Length]; |
| | | for (int i=0;i<MyColorStringArray.Length;i++) |
| | | { |
| | | int.TryParse(colorStringArray[i],out color[i]); |
| | | int.TryParse(MyColorStringArray[i],out MyColor[i]); |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[18],out top); |
| | |
|
| | | Descriptive = tables[19];
|
| | | if (tables[18].Contains("[")) |
| | | { |
| | | OtherColor = JsonMapper.ToObject<int[]>(tables[18]); |
| | | } |
| | | else |
| | | { |
| | | string[] OtherColorStringArray = tables[18].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | OtherColor = new int[OtherColorStringArray.Length]; |
| | | for (int i=0;i<OtherColorStringArray.Length;i++) |
| | | { |
| | | int.TryParse(OtherColorStringArray[i],out OtherColor[i]); |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|