0312 去掉表默认的多线程引用,小游戏不支持多线程;特效分离出UI特效;增加按钮组的控制;特效增加池管理
98个文件已修改
1个文件已删除
13 文件已复制
14个文件已添加
1 文件已重命名
| | |
| | | using System; |
| | | |
| | | |
| | | |
| | | public class FunctionButton : Button |
| | | { |
| | | [SerializeField] int m_Order = 0; |
| | | public int order { |
| | | get { return m_Order; } |
| | | set { |
| | | m_Order = value; |
| | | } |
| | | //关联游戏玩法功能按钮,如升星功能 |
| | | public class FunctionButton : Button |
| | | { |
| | | [SerializeField] int m_Order = 0; |
| | | public int order { |
| | | get { return m_Order; } |
| | | set { |
| | | m_Order = value; |
| | | } |
| | | |
| | | [SerializeField] int m_FunctionId = -1; |
| | | public int functionId { |
| | | get { return m_FunctionId; } |
| | | set { |
| | | m_FunctionId = value; |
| | | OnFunctionUnLockStateChange(); |
| | | } |
| | | } |
| | | |
| | | [SerializeField] TitleBtnState m_State = TitleBtnState.Normal; |
| | | public TitleBtnState state { |
| | | get { return m_State; } |
| | | set { |
| | | if (m_State != value) |
| | | { |
| | | m_State = value; |
| | | OnStateChange(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | [SerializeField] Button m_Button; |
| | | public Button button { |
| | | get { return m_Button; } |
| | | set { m_Button = value; } |
| | | } |
| | | |
| | | [SerializeField] ImageEx m_Icon; |
| | | public ImageEx icon { |
| | | get { return this.m_Icon; } |
| | | set { this.m_Icon = value; } |
| | | } |
| | | |
| | | [SerializeField] TextEx m_Title; |
| | | public TextEx title { |
| | | get { return this.m_Title; } |
| | | set { this.m_Title = value; } |
| | | } |
| | | |
| | | [SerializeField] RedpointBehaviour m_Redpoint; |
| | | public RedpointBehaviour redpoint { |
| | | get { return m_Redpoint; } |
| | | set { m_Redpoint = value; } |
| | | } |
| | | |
| | | [SerializeField] Shadow m_Shadow; |
| | | public Shadow shadow { |
| | | get { return this.m_Shadow; } |
| | | set { this.m_Shadow = value; } |
| | | } |
| | | |
| | | [SerializeField] Transform m_Locked; |
| | | public Transform locked { |
| | | get { return this.m_Locked; } |
| | | set { this.m_Locked = value; } |
| | | } |
| | | |
| | | [SerializeField] int m_Audio = 1; |
| | | public int clickAudio { |
| | | get { return this.m_Audio; } |
| | | set { this.m_Audio = value; } |
| | | } |
| | | |
| | | [SerializeField] bool m_UseDefaultConfig = true; |
| | | public bool useDefaultConfig { |
| | | get { return this.m_UseDefaultConfig; } |
| | | set { this.m_UseDefaultConfig = value; } |
| | | } |
| | | |
| | | [SerializeField] FunctionButtonConfig m_AlternativeConfig; |
| | | public FunctionButtonConfig alternativeConfig { get { return m_AlternativeConfig; } set { m_AlternativeConfig = value; } } |
| | | |
| | | [SerializeField] |
| | | FunctionButtonGroup m_Group; |
| | | public FunctionButtonGroup group { |
| | | get { return m_Group; } |
| | | set { |
| | | if (m_Group != null) |
| | | { |
| | | m_Group.UnRegister(this); |
| | | } |
| | | m_Group = value; |
| | | if (m_Group != null) |
| | | { |
| | | m_Group.Register(this); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public event Action<string> OnPointClickLockFunc; |
| | | public event Action repeatClickFunc; |
| | | |
| | | protected override void Awake() |
| | | { |
| | | #if UNITY_EDITOR |
| | | if (!Application.isPlaying) return; |
| | | #endif |
| | | OnFunctionUnLockStateChange(); |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionUnLockStateChange; |
| | | } |
| | | |
| | | protected override void OnEnable() |
| | | { |
| | | base.OnEnable(); |
| | | |
| | | if (group != null) |
| | | { |
| | | group.Register(this); |
| | | } |
| | | |
| | | OnStateChange(); |
| | | } |
| | | |
| | | protected override void OnDisable() |
| | | { |
| | | base.OnDisable(); |
| | | |
| | | if (group != null) |
| | | { |
| | | group.UnRegister(this); |
| | | } |
| | | } |
| | | |
| | | protected override void OnDestroy() |
| | | { |
| | | #if UNITY_EDITOR |
| | | if (!Application.isPlaying) return; |
| | | #endif |
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFunctionUnLockStateChange; |
| | | } |
| | | |
| | | bool invokeForce = false; |
| | | |
| | | public void Invoke(bool _force) |
| | | { |
| | | invokeForce = _force; |
| | | OnPointerClick(null); |
| | | invokeForce = false; |
| | | } |
| | | |
| | | public override void OnPointerClick(PointerEventData eventData) |
| | | { |
| | | if (state == TitleBtnState.Locked) |
| | | { |
| | | if (OnPointClickLockFunc != null) |
| | | { |
| | | OnPointClickLockFunc(this.gameObject.name); |
| | | } |
| | | else |
| | | { |
| | | FuncOpen.Instance.ProcessorFuncErrorTip(functionId); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | if (!invokeForce && state == TitleBtnState.Click) |
| | | { |
| | | if (repeatClickFunc != null) |
| | | { |
| | | repeatClickFunc(); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | if (base.onClick != null) |
| | | { |
| | | base.onClick.Invoke(); |
| | | if (eventData != null) |
| | | { |
| | | SoundPlayer.Instance.PlayUIAudio(clickAudio); |
| | | } |
| | | } |
| | | |
| | | state = TitleBtnState.Click; |
| | | } |
| | | |
| | | private void OnStateChange() |
| | | { |
| | | var config = useDefaultConfig ? FunctionButtonConfig.GetDefault() : m_AlternativeConfig; |
| | | if (Application.isPlaying) |
| | | { |
| | | icon.SetSprite(config.GetIconKey(state)); |
| | | } |
| | | |
| | | title.color = config.GetFontColor(state); |
| | | title.fontSize = config.GetFontSize(state); |
| | | |
| | | if (shadow != null) |
| | | { |
| | | shadow.enabled = state == TitleBtnState.Locked || state == TitleBtnState.Normal; |
| | | } |
| | | |
| | | if (locked != null) |
| | | { |
| | | locked.SetActive(state == TitleBtnState.Locked); |
| | | } |
| | | |
| | | if (group != null && state == TitleBtnState.Click) |
| | | { |
| | | group.NotifyToggleOn(this); |
| | | } |
| | | } |
| | | |
| | | private void OnFunctionUnLockStateChange(int _functionId) |
| | | { |
| | | if (m_FunctionId == _functionId) |
| | | { |
| | | OnFunctionUnLockStateChange(); |
| | | } |
| | | } |
| | | |
| | | private void OnFunctionUnLockStateChange() |
| | | { |
| | | if (m_FunctionId == 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var isOpen = m_FunctionId == -1 || FuncOpen.Instance.IsFuncOpen(m_FunctionId); |
| | | state = isOpen ? state == TitleBtnState.Click ? TitleBtnState.Click : TitleBtnState.Normal : TitleBtnState.Locked; |
| | | } |
| | | |
| | | #if UNITY_EDITOR |
| | | protected override void OnValidate() |
| | | { |
| | | base.OnValidate(); |
| | | OnStateChange(); |
| | | } |
| | | #endif |
| | | |
| | | } |
| | | |
| | | [SerializeField] int m_FunctionId = -1; |
| | | public int functionId { |
| | | get { return m_FunctionId; } |
| | | set { |
| | | m_FunctionId = value; |
| | | OnFunctionUnLockStateChange(); |
| | | } |
| | | } |
| | | |
| | | [SerializeField] TitleBtnState m_State = TitleBtnState.Normal; |
| | | public TitleBtnState state { |
| | | get { return m_State; } |
| | | set { |
| | | if (m_State != value) |
| | | { |
| | | m_State = value; |
| | | OnStateChange(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | [SerializeField] Button m_Button; |
| | | public Button button { |
| | | get { return m_Button; } |
| | | set { m_Button = value; } |
| | | } |
| | | |
| | | [SerializeField] ImageEx m_Icon; |
| | | public ImageEx icon { |
| | | get { return this.m_Icon; } |
| | | set { this.m_Icon = value; } |
| | | } |
| | | |
| | | [SerializeField] TextEx m_Title; |
| | | public TextEx title { |
| | | get { return this.m_Title; } |
| | | set { this.m_Title = value; } |
| | | } |
| | | |
| | | [SerializeField] RedpointBehaviour m_Redpoint; |
| | | public RedpointBehaviour redpoint { |
| | | get { return m_Redpoint; } |
| | | set { m_Redpoint = value; } |
| | | } |
| | | |
| | | [SerializeField] Shadow m_Shadow; |
| | | public Shadow shadow { |
| | | get { return this.m_Shadow; } |
| | | set { this.m_Shadow = value; } |
| | | } |
| | | |
| | | [SerializeField] Transform m_Locked; |
| | | public Transform locked { |
| | | get { return this.m_Locked; } |
| | | set { this.m_Locked = value; } |
| | | } |
| | | |
| | | [SerializeField] int m_Audio = 1; |
| | | public int clickAudio { |
| | | get { return this.m_Audio; } |
| | | set { this.m_Audio = value; } |
| | | } |
| | | |
| | | [SerializeField] bool m_UseDefaultConfig = true; |
| | | public bool useDefaultConfig { |
| | | get { return this.m_UseDefaultConfig; } |
| | | set { this.m_UseDefaultConfig = value; } |
| | | } |
| | | |
| | | [SerializeField] FunctionButtonConfig m_AlternativeConfig; |
| | | public FunctionButtonConfig alternativeConfig { get { return m_AlternativeConfig; } set { m_AlternativeConfig = value; } } |
| | | |
| | | [SerializeField] |
| | | FunctionButtonGroup m_Group; |
| | | public FunctionButtonGroup group { |
| | | get { return m_Group; } |
| | | set { |
| | | if (m_Group != null) |
| | | { |
| | | m_Group.UnRegister(this); |
| | | } |
| | | m_Group = value; |
| | | if (m_Group != null) |
| | | { |
| | | m_Group.Register(this); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public event Action<string> OnPointClickLockFunc; |
| | | public event Action repeatClickFunc; |
| | | |
| | | protected override void Awake() |
| | | { |
| | | #if UNITY_EDITOR |
| | | if (!Application.isPlaying) return; |
| | | #endif |
| | | OnFunctionUnLockStateChange(); |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionUnLockStateChange; |
| | | } |
| | | |
| | | protected override void OnEnable() |
| | | { |
| | | base.OnEnable(); |
| | | |
| | | if (group != null) |
| | | { |
| | | group.Register(this); |
| | | } |
| | | |
| | | OnStateChange(); |
| | | } |
| | | |
| | | protected override void OnDisable() |
| | | { |
| | | base.OnDisable(); |
| | | |
| | | if (group != null) |
| | | { |
| | | group.UnRegister(this); |
| | | } |
| | | } |
| | | |
| | | protected override void OnDestroy() |
| | | { |
| | | #if UNITY_EDITOR |
| | | if (!Application.isPlaying) return; |
| | | #endif |
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFunctionUnLockStateChange; |
| | | } |
| | | |
| | | bool invokeForce = false; |
| | | |
| | | public void Invoke(bool _force) |
| | | { |
| | | invokeForce = _force; |
| | | OnPointerClick(null); |
| | | invokeForce = false; |
| | | } |
| | | |
| | | public override void OnPointerClick(PointerEventData eventData) |
| | | { |
| | | if (state == TitleBtnState.Locked) |
| | | { |
| | | if (OnPointClickLockFunc != null) |
| | | { |
| | | OnPointClickLockFunc(this.gameObject.name); |
| | | } |
| | | else |
| | | { |
| | | FuncOpen.Instance.ProcessorFuncErrorTip(functionId); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | if (!invokeForce && state == TitleBtnState.Click) |
| | | { |
| | | if (repeatClickFunc != null) |
| | | { |
| | | repeatClickFunc(); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | if (base.onClick != null) |
| | | { |
| | | base.onClick.Invoke(); |
| | | if (eventData != null) |
| | | { |
| | | SoundPlayer.Instance.PlayUIAudio(clickAudio); |
| | | } |
| | | } |
| | | |
| | | state = TitleBtnState.Click; |
| | | } |
| | | |
| | | private void OnStateChange() |
| | | { |
| | | var config = useDefaultConfig ? FunctionButtonConfig.GetDefault() : m_AlternativeConfig; |
| | | if (Application.isPlaying) |
| | | { |
| | | icon.SetSprite(config.GetIconKey(state)); |
| | | } |
| | | |
| | | title.color = config.GetFontColor(state); |
| | | title.fontSize = config.GetFontSize(state); |
| | | |
| | | if (shadow != null) |
| | | { |
| | | shadow.enabled = state == TitleBtnState.Locked || state == TitleBtnState.Normal; |
| | | } |
| | | |
| | | if (locked != null) |
| | | { |
| | | locked.SetActive(state == TitleBtnState.Locked); |
| | | } |
| | | |
| | | if (group != null && state == TitleBtnState.Click) |
| | | { |
| | | group.NotifyToggleOn(this); |
| | | } |
| | | } |
| | | |
| | | private void OnFunctionUnLockStateChange(int _functionId) |
| | | { |
| | | if (m_FunctionId == _functionId) |
| | | { |
| | | OnFunctionUnLockStateChange(); |
| | | } |
| | | } |
| | | |
| | | private void OnFunctionUnLockStateChange() |
| | | { |
| | | if (m_FunctionId == 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var isOpen = m_FunctionId == -1 || FuncOpen.Instance.IsFuncOpen(m_FunctionId); |
| | | state = isOpen ? state == TitleBtnState.Click ? TitleBtnState.Click : TitleBtnState.Normal : TitleBtnState.Locked; |
| | | } |
| | | |
| | | #if UNITY_EDITOR |
| | | protected override void OnValidate() |
| | | { |
| | | base.OnValidate(); |
| | | OnStateChange(); |
| | | } |
| | | #endif |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | using UnityEngine.Events; |
| | | using System; |
| | | |
| | | public class FunctionButtonGroup : MonoBehaviour |
| | | //关联游戏玩法功能按钮,如升星功能 |
| | | public class FunctionButtonGroup : MonoBehaviour |
| | | { |
| | | [SerializeField] ScrollRect m_ScrollRect; |
| | | [SerializeField] RectTransform m_Container; |
| | | |
| | | public int unLockedCount |
| | | { |
| | | [SerializeField] ScrollRect m_ScrollRect; |
| | | [SerializeField] RectTransform m_Container; |
| | | |
| | | public int unLockedCount { |
| | | get { |
| | | var count = 0; |
| | | foreach (var button in functionButtons.Values) |
| | | get |
| | | { |
| | | var count = 0; |
| | | foreach (var button in functionButtons.Values) |
| | | { |
| | | if (button.state != TitleBtnState.Locked) |
| | | { |
| | | if (button.state != TitleBtnState.Locked) |
| | | { |
| | | count++; |
| | | } |
| | | } |
| | | |
| | | return count; |
| | | } |
| | | } |
| | | |
| | | int currentOrder = 0; |
| | | List<int> orders = new List<int>(); |
| | | Dictionary<int, FunctionButton> functionButtons = new Dictionary<int, FunctionButton>(); |
| | | |
| | | public void Register(FunctionButton button) |
| | | { |
| | | functionButtons[button.order] = button; |
| | | if (!orders.Contains(button.order)) |
| | | { |
| | | orders.Add(button.order); |
| | | orders.Sort(OrderCompare); |
| | | } |
| | | |
| | | if (m_ScrollRect != null) |
| | | { |
| | | m_ScrollRect.horizontal = functionButtons.Count > 5; |
| | | } |
| | | } |
| | | |
| | | public void ChangeHorizontal(bool move) |
| | | { |
| | | if (m_ScrollRect != null) |
| | | { |
| | | m_ScrollRect.horizontal = move; |
| | | } |
| | | } |
| | | |
| | | public void ChangeHorizontalPos(float index) |
| | | { |
| | | if (m_ScrollRect != null) |
| | | { |
| | | m_ScrollRect.horizontalNormalizedPosition = index; |
| | | } |
| | | } |
| | | public void UnRegister(FunctionButton button) |
| | | { |
| | | if (functionButtons.ContainsKey(button.order)) |
| | | { |
| | | functionButtons.Remove(button.order); |
| | | } |
| | | |
| | | if (orders.Contains(button.order)) |
| | | { |
| | | orders.Remove(button.order); |
| | | orders.Sort(OrderCompare); |
| | | } |
| | | |
| | | if (m_ScrollRect != null) |
| | | { |
| | | m_ScrollRect.horizontal = functionButtons.Count > 5; |
| | | } |
| | | } |
| | | |
| | | public void NotifyToggleOn(FunctionButton button) |
| | | { |
| | | |
| | | if (button.state == TitleBtnState.Click) |
| | | { |
| | | currentOrder = button.order; |
| | | for (int i = 0; i < orders.Count; i++) |
| | | { |
| | | if (!functionButtons.ContainsKey(orders[i])) |
| | | { |
| | | Debug.LogFormat("<color=#ff0000ff>{0} {1}</color>", orders[i], button.name); |
| | | } |
| | | var functionButton = functionButtons[orders[i]]; |
| | | if (functionButton != button && functionButton.state != TitleBtnState.Locked) |
| | | { |
| | | functionButton.state = TitleBtnState.Normal; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void TriggerByOrder(int targetOrder) |
| | | { |
| | | for (int i = 0; i < orders.Count; i++) |
| | | { |
| | | var order = orders[i]; |
| | | if (order == targetOrder) |
| | | { |
| | | functionButtons[order].Invoke(true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void TriggerLast() |
| | | { |
| | | var index = orders.IndexOf(currentOrder); |
| | | if (index < 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var loopTimes = 0; |
| | | while (loopTimes < 2) |
| | | { |
| | | index--; |
| | | if (index < 0) |
| | | { |
| | | index = orders.Count - 1; |
| | | loopTimes++; |
| | | } |
| | | |
| | | var next = orders[index]; |
| | | if (functionButtons[next].state != TitleBtnState.Locked) |
| | | { |
| | | functionButtons[next].Invoke(false); |
| | | break; |
| | | count++; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public void TriggerNext() |
| | | { |
| | | var index = orders.IndexOf(currentOrder); |
| | | if (index < 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var loopTimes = 0; |
| | | while (loopTimes < 2) |
| | | { |
| | | index++; |
| | | if (index > orders.Count - 1) |
| | | { |
| | | index = 0; |
| | | loopTimes++; |
| | | } |
| | | |
| | | var next = orders[index]; |
| | | if (functionButtons[next].state != TitleBtnState.Locked) |
| | | { |
| | | functionButtons[next].Invoke(false); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public bool IsFirst() |
| | | { |
| | | return orders.Count > 0 && currentOrder == orders[0]; |
| | | } |
| | | |
| | | public bool IsLast() |
| | | { |
| | | return orders.Count > 0 && currentOrder == orders[orders.Count - 1]; |
| | | } |
| | | |
| | | public void GotoOrder(int order) |
| | | { |
| | | if (m_ScrollRect != null) |
| | | { |
| | | var index = orders.IndexOf(order); |
| | | if (m_ScrollRect.horizontal) |
| | | { |
| | | m_ScrollRect.horizontalNormalizedPosition = (float)index / orders.Count; |
| | | } |
| | | else if (m_ScrollRect.vertical) |
| | | { |
| | | m_ScrollRect.verticalNormalizedPosition = (float)index / orders.Count; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private int OrderCompare(int a, int b) |
| | | { |
| | | return a < b ? -1 : 1; |
| | | } |
| | | |
| | | public FunctionButton AddFunction(string pattern, int order, int functionId, string title, int redpointId) |
| | | { |
| | | if (m_Container == null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var instance = UIUtility.CreateWidget(pattern, string.Concat("Function_", order)); |
| | | instance.transform.SetParentEx(this.m_Container, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | |
| | | var functionButton = instance.GetComponent<FunctionButton>(); |
| | | functionButton.functionId = functionId; |
| | | functionButton.order = order; |
| | | functionButton.title.text = title; |
| | | |
| | | functionButton.group = this; |
| | | functionButton.redpoint.redpointId = redpointId; |
| | | functionButtons[order] = functionButton; |
| | | |
| | | functionButton.SetActive(functionButton.functionId != -1); |
| | | return functionButton; |
| | | } |
| | | |
| | | public void SetFunctionListener(int order, Action callBack) |
| | | { |
| | | if (functionButtons.ContainsKey(order)) |
| | | { |
| | | functionButtons[order].SetListener(() => callBack?.Invoke()); |
| | | } |
| | | } |
| | | |
| | | public void SetFunctionButtonActive(int order, bool isShow) |
| | | { |
| | | if (functionButtons.ContainsKey(order)) |
| | | { |
| | | functionButtons[order].SetActive(isShow); |
| | | } |
| | | } |
| | | |
| | | public RedPointState GetFunctionButtonRedPointState(int order) |
| | | { |
| | | if (functionButtons.ContainsKey(order)) |
| | | { |
| | | return RedpointCenter.Instance.GetRedpointState(functionButtons[order].redpoint.redpointId); |
| | | } |
| | | |
| | | return RedPointState.None; |
| | | } |
| | | |
| | | public FunctionButton GetFunctionBtn(int order) |
| | | { |
| | | if (functionButtons.ContainsKey(order)) |
| | | { |
| | | return functionButtons[order]; |
| | | } |
| | | return null; |
| | | return count; |
| | | } |
| | | } |
| | | |
| | | int currentOrder = 0; |
| | | List<int> orders = new List<int>(); |
| | | Dictionary<int, FunctionButton> functionButtons = new Dictionary<int, FunctionButton>(); |
| | | |
| | | public void Register(FunctionButton button) |
| | | { |
| | | functionButtons[button.order] = button; |
| | | if (!orders.Contains(button.order)) |
| | | { |
| | | orders.Add(button.order); |
| | | orders.Sort(OrderCompare); |
| | | } |
| | | |
| | | if (m_ScrollRect != null) |
| | | { |
| | | m_ScrollRect.horizontal = functionButtons.Count > 5; |
| | | } |
| | | } |
| | | |
| | | public void ChangeHorizontal(bool move) |
| | | { |
| | | if (m_ScrollRect != null) |
| | | { |
| | | m_ScrollRect.horizontal = move; |
| | | } |
| | | } |
| | | |
| | | public void ChangeHorizontalPos(float index) |
| | | { |
| | | if (m_ScrollRect != null) |
| | | { |
| | | m_ScrollRect.horizontalNormalizedPosition = index; |
| | | } |
| | | } |
| | | public void UnRegister(FunctionButton button) |
| | | { |
| | | if (functionButtons.ContainsKey(button.order)) |
| | | { |
| | | functionButtons.Remove(button.order); |
| | | } |
| | | |
| | | if (orders.Contains(button.order)) |
| | | { |
| | | orders.Remove(button.order); |
| | | orders.Sort(OrderCompare); |
| | | } |
| | | |
| | | if (m_ScrollRect != null) |
| | | { |
| | | m_ScrollRect.horizontal = functionButtons.Count > 5; |
| | | } |
| | | } |
| | | |
| | | public void NotifyToggleOn(FunctionButton button) |
| | | { |
| | | |
| | | if (button.state == TitleBtnState.Click) |
| | | { |
| | | currentOrder = button.order; |
| | | for (int i = 0; i < orders.Count; i++) |
| | | { |
| | | if (!functionButtons.ContainsKey(orders[i])) |
| | | { |
| | | Debug.LogFormat("<color=#ff0000ff>{0} {1}</color>", orders[i], button.name); |
| | | } |
| | | var functionButton = functionButtons[orders[i]]; |
| | | if (functionButton != button && functionButton.state != TitleBtnState.Locked) |
| | | { |
| | | functionButton.state = TitleBtnState.Normal; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void TriggerByOrder(int targetOrder) |
| | | { |
| | | for (int i = 0; i < orders.Count; i++) |
| | | { |
| | | var order = orders[i]; |
| | | if (order == targetOrder) |
| | | { |
| | | functionButtons[order].Invoke(true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void TriggerLast() |
| | | { |
| | | var index = orders.IndexOf(currentOrder); |
| | | if (index < 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var loopTimes = 0; |
| | | while (loopTimes < 2) |
| | | { |
| | | index--; |
| | | if (index < 0) |
| | | { |
| | | index = orders.Count - 1; |
| | | loopTimes++; |
| | | } |
| | | |
| | | var next = orders[index]; |
| | | if (functionButtons[next].state != TitleBtnState.Locked) |
| | | { |
| | | functionButtons[next].Invoke(false); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public void TriggerNext() |
| | | { |
| | | var index = orders.IndexOf(currentOrder); |
| | | if (index < 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var loopTimes = 0; |
| | | while (loopTimes < 2) |
| | | { |
| | | index++; |
| | | if (index > orders.Count - 1) |
| | | { |
| | | index = 0; |
| | | loopTimes++; |
| | | } |
| | | |
| | | var next = orders[index]; |
| | | if (functionButtons[next].state != TitleBtnState.Locked) |
| | | { |
| | | functionButtons[next].Invoke(false); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public bool IsFirst() |
| | | { |
| | | return orders.Count > 0 && currentOrder == orders[0]; |
| | | } |
| | | |
| | | public bool IsLast() |
| | | { |
| | | return orders.Count > 0 && currentOrder == orders[orders.Count - 1]; |
| | | } |
| | | |
| | | public void GotoOrder(int order) |
| | | { |
| | | if (m_ScrollRect != null) |
| | | { |
| | | var index = orders.IndexOf(order); |
| | | if (m_ScrollRect.horizontal) |
| | | { |
| | | m_ScrollRect.horizontalNormalizedPosition = (float)index / orders.Count; |
| | | } |
| | | else if (m_ScrollRect.vertical) |
| | | { |
| | | m_ScrollRect.verticalNormalizedPosition = (float)index / orders.Count; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private int OrderCompare(int a, int b) |
| | | { |
| | | return a < b ? -1 : 1; |
| | | } |
| | | |
| | | public FunctionButton AddFunction(string pattern, int order, int functionId, string title, int redpointId) |
| | | { |
| | | if (m_Container == null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var instance = UIUtility.CreateWidget(pattern, string.Concat("Function_", order)); |
| | | instance.transform.SetParentEx(this.m_Container, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | |
| | | var functionButton = instance.GetComponent<FunctionButton>(); |
| | | functionButton.functionId = functionId; |
| | | functionButton.order = order; |
| | | functionButton.title.text = title; |
| | | |
| | | functionButton.group = this; |
| | | functionButton.redpoint.redpointId = redpointId; |
| | | functionButtons[order] = functionButton; |
| | | |
| | | functionButton.SetActive(functionButton.functionId != -1); |
| | | return functionButton; |
| | | } |
| | | |
| | | public void SetFunctionListener(int order, Action callBack) |
| | | { |
| | | if (functionButtons.ContainsKey(order)) |
| | | { |
| | | functionButtons[order].SetListener(() => callBack?.Invoke()); |
| | | } |
| | | } |
| | | |
| | | public void SetFunctionButtonActive(int order, bool isShow) |
| | | { |
| | | if (functionButtons.ContainsKey(order)) |
| | | { |
| | | functionButtons[order].SetActive(isShow); |
| | | } |
| | | } |
| | | |
| | | public RedPointState GetFunctionButtonRedPointState(int order) |
| | | { |
| | | if (functionButtons.ContainsKey(order)) |
| | | { |
| | | return RedpointCenter.Instance.GetRedpointState(functionButtons[order].redpoint.redpointId); |
| | | } |
| | | |
| | | return RedPointState.None; |
| | | } |
| | | |
| | | public FunctionButton GetFunctionBtn(int order) |
| | | { |
| | | if (functionButtons.ContainsKey(order)) |
| | | { |
| | | return functionButtons[order]; |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 玩个游戏 |
| | | // [ Date ]: Tuesday, October 31, 2017 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using UnityEngine.EventSystems; |
| | | |
| | | using System; |
| | | |
| | | |
| | | //关联按钮,其中一个亮起,其他按下,文字颜色对应变更 |
| | | //数据更新通过SelectBtn更新 或者 GroupButtonExManager.SelectButton |
| | | public class GroupButtonEx : ButtonEx |
| | | { |
| | | [SerializeField] GroupButtonExManager m_Manager; // 按钮组管理器引用 |
| | | public GroupButtonExManager manager |
| | | { |
| | | get { return m_Manager; } |
| | | set |
| | | { |
| | | if (m_Manager != value) |
| | | { |
| | | // 从旧管理器移除并添加到新管理器 |
| | | if (m_Manager != null) |
| | | { |
| | | m_Manager.RemoveButton(this); |
| | | } |
| | | |
| | | m_Manager = value; |
| | | |
| | | if (m_Manager != null) |
| | | { |
| | | m_Manager.AddButton(this); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | [NonSerialized] TitleBtnState m_State = TitleBtnState.Normal; |
| | | public TitleBtnState state |
| | | { |
| | | get { return m_State; } |
| | | set |
| | | { |
| | | if (m_State != value) |
| | | { |
| | | m_State = value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | [SerializeField] ImageEx m_SelectIcon; |
| | | public ImageEx selectIcon |
| | | { |
| | | get { return this.m_SelectIcon; } |
| | | set { this.m_SelectIcon = value; } |
| | | } |
| | | |
| | | [SerializeField] ImageEx m_UnSelectIcon; |
| | | public ImageEx unSelectIcon |
| | | { |
| | | get { return this.m_UnSelectIcon; } |
| | | set { this.m_UnSelectIcon = value; } |
| | | } |
| | | |
| | | [SerializeField] TextEx m_Title; |
| | | public TextEx title |
| | | { |
| | | get { return this.m_Title; } |
| | | set { this.m_Title = value; } |
| | | } |
| | | |
| | | [SerializeField] UIEffectPlayer m_SelectEffect; //选中特效 |
| | | public UIEffectPlayer selectEffect |
| | | { |
| | | get { return m_SelectEffect; } |
| | | set { m_SelectEffect = value; } |
| | | } |
| | | |
| | | |
| | | protected override void Awake() |
| | | { |
| | | base.Awake(); |
| | | // 确保已添加到管理器 |
| | | if (m_Manager != null) |
| | | { |
| | | m_Manager.AddButton(this); |
| | | } |
| | | } |
| | | |
| | | protected override void OnDestroy() |
| | | { |
| | | if (m_Manager != null) |
| | | { |
| | | m_Manager.RemoveButton(this); |
| | | } |
| | | base.OnDestroy(); |
| | | } |
| | | |
| | | public override void OnPointerClick(PointerEventData eventData) |
| | | { |
| | | base.OnPointerClick(eventData); |
| | | SelectBtn(); |
| | | } |
| | | |
| | | // 选中当前按钮 |
| | | public void SelectBtn(bool forceRefresh = false) |
| | | { |
| | | if (m_State == TitleBtnState.Click && !forceRefresh) |
| | | return; |
| | | |
| | | // 通过管理器处理选中逻辑 |
| | | if (m_Manager != null) |
| | | { |
| | | m_Manager.SelectButton(this); |
| | | } |
| | | |
| | | // 设置当前按钮为选中状态 |
| | | state = TitleBtnState.Click; |
| | | } |
| | | |
| | | // 更新按钮状态 |
| | | public void UpdateButtonState() |
| | | { |
| | | // 更新图标显示 |
| | | if (m_SelectIcon != null) |
| | | m_SelectIcon.SetActive(m_State == TitleBtnState.Click); |
| | | |
| | | if (m_UnSelectIcon != null) |
| | | m_UnSelectIcon.SetActive(m_State != TitleBtnState.Click); |
| | | |
| | | // 更新文字颜色 |
| | | if (m_Title != null && m_Manager != null) |
| | | { |
| | | m_Title.color = m_Manager.GetTextColorForState(m_State); |
| | | } |
| | | |
| | | if (m_SelectEffect != null) |
| | | { |
| | | if (m_State == TitleBtnState.Click) |
| | | { |
| | | //选中,显示特效 |
| | | m_SelectEffect.Play(); |
| | | } |
| | | else |
| | | { |
| | | m_SelectEffect.Stop(); |
| | | } |
| | | } |
| | | } |
| | | } |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/Component/UI/Common/GroupButtonEx.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 97eda1b97c0fe374f9197d882712f299 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 玩个游戏 |
| | | // [ Date ]: Tuesday, October 31, 2017 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | |
| | | using System; |
| | | |
| | | /// <summary> |
| | | /// 按钮组管理器,负责管理GroupButtonEx组件的组关系和状态切换 |
| | | /// 暂用于预制体中的设置,如果是动态增删按钮需重测试逻辑 |
| | | /// </summary> |
| | | public class GroupButtonExManager : MonoBehaviour |
| | | { |
| | | // 按钮组列表 |
| | | private List<GroupButtonEx> m_Buttons = new List<GroupButtonEx>(); |
| | | |
| | | [SerializeField] Color m_SelectedTextColor = Color.white; // 选中状态文字颜色 |
| | | public Color selectedTextColor { |
| | | get { return m_SelectedTextColor; } |
| | | set { |
| | | m_SelectedTextColor = value; |
| | | } |
| | | } |
| | | |
| | | [SerializeField] Color m_NormalTextColor = new Color(0.7f, 0.7f, 0.7f); // 未选中状态文字颜色 |
| | | public Color normalTextColor { |
| | | get { return m_NormalTextColor; } |
| | | set { |
| | | m_NormalTextColor = value; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 将按钮添加到组 |
| | | /// </summary> |
| | | /// <param name="button">要添加的按钮</param> |
| | | public void AddButton(GroupButtonEx button) |
| | | { |
| | | if (button == null) |
| | | return; |
| | | |
| | | // 如果按钮不在组中,添加到组 |
| | | if (!m_Buttons.Contains(button)) |
| | | { |
| | | m_Buttons.Add(button); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 从组中移除按钮 |
| | | /// </summary> |
| | | /// <param name="button">要移除的按钮</param> |
| | | public void RemoveButton(GroupButtonEx button) |
| | | { |
| | | if (button == null) |
| | | return; |
| | | |
| | | m_Buttons.Remove(button); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 选中指定按钮,并取消其他按钮的选中状态 |
| | | /// </summary> |
| | | /// <param name="button">要选中的按钮</param> |
| | | public void SelectButton(GroupButtonEx button) |
| | | { |
| | | if (button == null) |
| | | return; |
| | | |
| | | // 取消其他按钮的选中状态 |
| | | foreach (var btn in m_Buttons) |
| | | { |
| | | if (btn != button) |
| | | { |
| | | btn.state = TitleBtnState.Normal; |
| | | } |
| | | } |
| | | |
| | | UpdateAllButtonsState(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取组中的所有按钮 |
| | | /// </summary> |
| | | /// <returns>按钮列表</returns> |
| | | public List<GroupButtonEx> GetButtons() |
| | | { |
| | | return new List<GroupButtonEx>(m_Buttons); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取组中当前选中的按钮 |
| | | /// </summary> |
| | | /// <returns>选中的按钮,如果没有则返回null</returns> |
| | | public GroupButtonEx GetSelectedButton() |
| | | { |
| | | foreach (var btn in m_Buttons) |
| | | { |
| | | if (btn.state == TitleBtnState.Click) |
| | | return btn; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清除所有按钮 |
| | | /// </summary> |
| | | public void ClearButtons() |
| | | { |
| | | m_Buttons.Clear(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新所有按钮的状态 |
| | | /// </summary> |
| | | private void UpdateAllButtonsState() |
| | | { |
| | | SortBtns(); |
| | | |
| | | foreach (var btn in m_Buttons) |
| | | { |
| | | btn.UpdateButtonState(); |
| | | } |
| | | } |
| | | |
| | | bool sortyet = false; |
| | | public void SortBtns(bool forceSort = false) |
| | | { |
| | | if (m_Buttons.Count <= 0) |
| | | return; |
| | | |
| | | if (sortyet && !forceSort) |
| | | return; |
| | | |
| | | m_Buttons.Sort((a, b) => { return a.transform.GetSiblingIndex() - b.transform.GetSiblingIndex(); }); |
| | | sortyet = true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取按钮状态对应的文本颜色 |
| | | /// </summary> |
| | | /// <param name="state">按钮状态</param> |
| | | /// <returns>对应的文本颜色</returns> |
| | | public Color GetTextColorForState(TitleBtnState state) |
| | | { |
| | | return state == TitleBtnState.Click ? m_SelectedTextColor : m_NormalTextColor; |
| | | } |
| | | } |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/Component/UI/Common/GroupButtonExManager.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 25d1a287b0e773443a2231ff104728ad |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | |
| | | using UnityEngine; |
| | | public class ItemBaseEffect : MonoBehaviour |
| | | { |
| | | [SerializeField] EffectPlayer m_SuitEffect; |
| | | [SerializeField] UIEffectPlayer m_SuitEffect; |
| | | |
| | | int itemId = 0; |
| | | |
| | |
| | | using UnityEngine; |
| | | |
| | | public class EffectMgr : SingletonMonobehaviour<EffectMgr> |
| | | public class EffectMgr |
| | | { |
| | | |
| | | |
| | | //玩家是否主动屏蔽了特效 |
| | | public bool IsNotShowBySetting(int id) |
| | | public static bool IsNotShowBySetting(int id) |
| | | { |
| | | var config = EffectConfig.Get(id); |
| | | if (config == null) |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | // public void RecyleUIEffect(int id, GameObject _effectObj) |
| | | // { |
| | | // EffectConfig effectCfg = EffectConfig.Get(id); |
| | | |
| | | // if (null == effectCfg) |
| | | // { |
| | | // return; |
| | | // } |
| | | |
| | | // var _prefab = ResManager.Instance.LoadAsset<GameObject>("UIEffect/" + effectCfg.packageName, effectCfg.fxName); |
| | | // if (_prefab == null) |
| | | // { |
| | | // return; |
| | | // } |
| | | |
| | | // GameObjectPoolManager.GameObjectPool _pool = GameObjectPoolManager.Instance.RequestPool(_prefab); |
| | | // if (_pool != null) |
| | | // { |
| | | // _pool.Release(_effectObj); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | |
| | | using Spine; |
| | | using UnityEngine.UI; |
| | | |
| | | // 特效播放器,对象池管理:unity特效和spine特效都是做好的预制体 |
| | | // unity特效预制体是特效师在制作的时候生成的,unity特效约定挂载设置播放时长脚本 |
| | | // spine特效是特效师制作的动画文件可直接加载用,制作成预制体可增加BoneFollower之类的进行逻辑处理 |
| | | // 非UI特效使用,UI特效UIEffectPlayer继承EffectPlayer,后续如果逻辑冲突大则不用继承 |
| | | public class EffectPlayer : MonoBehaviour |
| | | { |
| | | public int effectId; |
| | | [SerializeField] |
| | | private int m_EffectID; |
| | | public int effectId |
| | | { |
| | | get |
| | | { |
| | | return m_EffectID; |
| | | } |
| | | set |
| | | { |
| | | if (value != m_EffectID) |
| | | { |
| | | isInit = false; |
| | | m_EffectID = value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public EffectConfig effectConfig; |
| | | |
| | | public Action<EffectPlayer> onDestroy; |
| | | public Action onComplete; |
| | | |
| | | public float speedRate = 1f; |
| | | |
| | | [Header("是否在显示时播放")] |
| | | public bool isPlayOnEnable = false; |
| | | |
| | | [Header("是否立即播放spine特效")] |
| | | public bool isPlaySpineImmediately = false; |
| | | [Header("是否循环播放spine特效")] |
| | | public bool isPlaySpineLoop = false; |
| | | |
| | | |
| | | [Header("播放完毕立即回收")] |
| | | public bool isReleaseImmediately = true; //界面特效一般不需要自我销毁,跟随界面或者父对象销毁就行 |
| | | |
| | | public Action<EffectPlayer> onDestroy; |
| | | |
| | | [HideInInspector] public Canvas canvas = null; |
| | | |
| | |
| | | protected SkeletonGraphic spineComp; |
| | | protected Spine.AnimationState spineAnimationState; |
| | | |
| | | protected void OnEnable() |
| | | public GameObjectPoolManager.GameObjectPool pool; |
| | | |
| | | public Action onComplete; |
| | | |
| | | protected virtual void OnEnable() |
| | | { |
| | | if (isPlayOnEnable) |
| | | if (spineComp != null) |
| | | { |
| | | Play(); |
| | | //隐藏,会有静态显示问题 |
| | | spineComp.enabled = false; |
| | | } |
| | | } |
| | | |
| | | protected bool InitCompnent() |
| | | protected void InitComponent(bool showLog = true) |
| | | { |
| | | if (effectId <= 0) |
| | | { |
| | | effectConfig = null; |
| | | // 根据逻辑需求,动态设置特效的情况 |
| | | // Debug.LogError("EffectPlayer effectId is not set"); |
| | | // #if UNITY_EDITOR |
| | | // UnityEditor.Selection.activeGameObject = gameObject; |
| | | // UnityEditor.EditorGUIUtility.PingObject(gameObject); |
| | | // #endif |
| | | return false; |
| | | #if UNITY_EDITOR |
| | | if (showLog) |
| | | { |
| | | Debug.LogError("EffectPlayer effectId is not set"); |
| | | UnityEditor.Selection.activeGameObject = gameObject; |
| | | UnityEditor.EditorGUIUtility.PingObject(gameObject); |
| | | } |
| | | #endif |
| | | return; |
| | | } |
| | | |
| | | effectConfig = EffectConfig.Get(effectId); |
| | | |
| | | if (null == effectConfig) |
| | | { |
| | | Debug.LogError("could not find effect config, effect id is " + effectId); |
| | | #if UNITY_EDITOR |
| | | Debug.LogError("could not find effect config, effect id is " + effectId); |
| | | UnityEditor.Selection.activeGameObject = gameObject; |
| | | UnityEditor.EditorGUIUtility.PingObject(gameObject); |
| | | #endif |
| | | return false; |
| | | return; |
| | | } |
| | | |
| | | |
| | | Clear(); |
| | | return; |
| | | } |
| | | |
| | | protected virtual void Clear() |
| | | { |
| | | particleList.Clear(); |
| | | animatorList.Clear(); |
| | | rendererList.Clear(); |
| | | spineComp = null; |
| | | |
| | | //spine是加载文件,需要提前挂载脚本,unity特效是已经做好的预制体待加载后收集组件 |
| | | if (effectConfig.isSpine != 0) |
| | | { |
| | | spineComp = gameObject.AddMissingComponent<SkeletonGraphic>(); |
| | | |
| | | } |
| | | // else |
| | | // { |
| | | // // 收集组件 |
| | | // particleList.AddRange(gameObject.GetComponentsInChildren<ParticleSystem>(true)); |
| | | // animatorList.AddRange(gameObject.GetComponentsInChildren<Animator>(true)); |
| | | // } |
| | | // rendererList.AddRange(gameObject.GetComponentsInChildren<Renderer>(true)); |
| | | |
| | | return true; |
| | | pool = null; |
| | | } |
| | | |
| | | public void Stop() |
| | | public virtual void Stop() |
| | | { |
| | | if (null != effectTarget) |
| | | { |
| | | DestroyImmediate(effectTarget); |
| | | // 如果使用了特效预制体池,则归还到池中 |
| | | if (pool != null) |
| | | { |
| | | pool.Release(effectTarget); |
| | | } |
| | | effectTarget = null; |
| | | } |
| | | |
| | | isInit = false; |
| | | |
| | | particleList.Clear(); |
| | | animatorList.Clear(); |
| | | rendererList.Clear(); |
| | | spineComp = null; |
| | | Clear(); |
| | | onComplete?.Invoke(); |
| | | } |
| | | |
| | | public void Play() |
| | | { |
| | | ReStart(); |
| | | } |
| | | |
| | | |
| | | protected void ReStart() |
| | | public virtual void Play(bool showLog = true) |
| | | { |
| | | if (!isInit) |
| | | { |
| | | if (InitCompnent()) |
| | | InitComponent(showLog); |
| | | isInit = true; |
| | | } |
| | | else |
| | | { |
| | | //避免重复创建 |
| | | if (!this.gameObject.activeSelf) |
| | | { |
| | | isInit = true; |
| | | this.gameObject.SetActive(true); |
| | | } |
| | | else |
| | | { |
| | | //根据逻辑需求,动态设置特效的情况 |
| | | return; |
| | | } |
| | | |
| | | return; |
| | | } |
| | | |
| | | if (EffectMgr.Instance.IsNotShowBySetting(effectId)) |
| | | if (EffectMgr.IsNotShowBySetting(effectId)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (null != effectTarget) |
| | | { |
| | | DestroyImmediate(effectTarget); |
| | | if (pool != null) |
| | | pool.Release(effectTarget); |
| | | effectTarget = null; |
| | | } |
| | | |
| | | // YYL TODO |
| | | // 在这里考虑用池的话可能走配置好一点 原本的是无论如何都走池 但是实际上有些特效并不需要 |
| | | |
| | | // 加载spine特效资源 |
| | | if (effectConfig.isSpine != 0) |
| | | if (!this.gameObject.activeSelf) |
| | | { |
| | | spineComp.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("UIEffect/" + effectConfig.packageName, effectConfig.fxName + "_SkeletonData"); |
| | | spineComp.raycastTarget = false; |
| | | spineComp.Initialize(true); |
| | | spineAnimationState = spineComp.AnimationState; |
| | | spineAnimationState.Complete -= OnSpineAnimationComplete; |
| | | spineAnimationState.Complete += OnSpineAnimationComplete; |
| | | if (isPlaySpineImmediately) |
| | | { |
| | | //UI特效常用方式 |
| | | spineComp.enabled = true; |
| | | // 播放第一个动画(作为默认动画) |
| | | var skeletonData = spineComp.Skeleton.Data; |
| | | if (skeletonData.Animations.Count > 0) |
| | | { |
| | | string defaultAnimationName = skeletonData.Animations.Items[0].Name; |
| | | spineComp.AnimationState.SetAnimation(0, defaultAnimationName, isPlaySpineLoop); |
| | | } |
| | | else |
| | | { |
| | | Debug.LogError("Spine 数据中没有找到任何动画!" + effectConfig.id); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | spineComp.enabled = false; |
| | | } |
| | | |
| | | |
| | | return; |
| | | this.gameObject.SetActive(true); |
| | | } |
| | | |
| | | //加载unity特效 |
| | | PlayerEffect(true); |
| | | |
| | | } |
| | | |
| | | |
| | | protected virtual void PlaySpineEffect() |
| | | { |
| | | spineComp = gameObject.GetComponentInChildren<SkeletonGraphic>(true); |
| | | spineComp.raycastTarget = false; |
| | | spineComp.Initialize(true); |
| | | spineAnimationState = spineComp.AnimationState; |
| | | spineAnimationState.Complete -= OnSpineAnimationComplete; |
| | | spineAnimationState.Complete += OnSpineAnimationComplete; |
| | | |
| | | // 外层控制具体播放哪个动画 |
| | | spineComp.enabled = true; |
| | | |
| | | return; |
| | | } |
| | | |
| | | protected virtual void PlayerEffect(bool playSpine) |
| | | { |
| | | var effectPrefab = ResManager.Instance.LoadAsset<GameObject>("UIEffect/" + effectConfig.packageName, effectConfig.fxName); |
| | | if (effectPrefab == null) |
| | | { |
| | |
| | | return; |
| | | } |
| | | |
| | | // 实例化特效 |
| | | effectTarget = Instantiate(effectPrefab, transform); |
| | | if (effectConfig.isSpine == 0) |
| | | { |
| | | //unity特效 判断预制体是否挂载EffectTime |
| | | var timeObj = effectPrefab.GetComponent<EffectTime>(); |
| | | if (null == timeObj) |
| | | { |
| | | Debug.LogError($"{effectPrefab.name}预制体没有挂载EffectTime"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // 从特效预制体池获取特效 |
| | | pool = GameObjectPoolManager.Instance.RequestPool(effectPrefab); |
| | | effectTarget = pool.Request(); |
| | | // 设置父节点和位置 |
| | | effectTarget.transform.SetParent(transform); |
| | | effectTarget.transform.localPosition = Vector3.zero; |
| | | effectTarget.transform.localScale = Vector3.one; |
| | | effectTarget.transform.localRotation = Quaternion.identity; |
| | | effectTarget.name = $"Effect_{effectConfig.fxName}"; |
| | | |
| | | //挂载组件后 开始收集 |
| | | particleList.AddRange(gameObject.GetComponentsInChildren<ParticleSystem>(true)); |
| | | animatorList.AddRange(gameObject.GetComponentsInChildren<Animator>(true)); |
| | | rendererList.AddRange(gameObject.GetComponentsInChildren<Renderer>(true)); |
| | | if (effectConfig.isSpine != 0 && playSpine) |
| | | { |
| | | //预制体 |
| | | PlaySpineEffect(); |
| | | } |
| | | else |
| | | { |
| | | //挂载组件后 开始收集 |
| | | particleList.AddRange(gameObject.GetComponentsInChildren<ParticleSystem>(true)); |
| | | animatorList.AddRange(gameObject.GetComponentsInChildren<Animator>(true)); |
| | | rendererList.AddRange(gameObject.GetComponentsInChildren<Renderer>(true)); |
| | | OnUnityAnimationComplete(); |
| | | } |
| | | |
| | | |
| | | // 思考一下在没有挂在节点的时候 |
| | | if (null == canvas) |
| | | canvas = GetComponentInParent<Canvas>(); |
| | | |
| | | |
| | | // 添加特效穿透阻挡器 |
| | | blocker = effectTarget.AddMissingComponent<EffectPenetrationBlocker>(); |
| | |
| | | if (canvas != null) |
| | | { |
| | | blocker.SetParentCanvas(canvas); |
| | | } |
| | | |
| | | // 自动销毁 |
| | | if (effectConfig.autoDestroy != 0) |
| | | { |
| | | Destroy(effectTarget, effectConfig.destroyDelay); |
| | | } |
| | | } |
| | | |
| | |
| | | onDestroy.Invoke(this); |
| | | onDestroy = null; |
| | | } |
| | | // 停止特效并归还到池中 |
| | | Stop(); |
| | | |
| | | if (spineAnimationState != null) |
| | | { |
| | | spineAnimationState.Complete -= OnSpineAnimationComplete; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //单次播放完毕就会触发,即使是循环 |
| | | protected void OnSpineAnimationComplete(Spine.TrackEntry trackEntry) |
| | | protected virtual void OnSpineAnimationComplete(Spine.TrackEntry trackEntry) |
| | | { |
| | | if (!isPlaySpineLoop) |
| | | { |
| | | if (onComplete == null) |
| | | { |
| | | if (effectConfig.isSpine != 0) |
| | | { |
| | | spineComp.enabled = false; |
| | | } |
| | | } |
| | | |
| | | onComplete?.Invoke(); |
| | | if (isReleaseImmediately) |
| | | { |
| | | spineComp.enabled = false; |
| | | Stop(); |
| | | } |
| | | } |
| | | |
| | | |
| | | private void OnUnityAnimationComplete() |
| | | { |
| | | var timeObj = effectTarget.GetComponent<EffectTime>(); |
| | | if (!timeObj.isLoop) |
| | | { |
| | | this.SetWait(timeObj.playTime); |
| | | this.DoWaitRestart(); |
| | | this.OnWaitCompelete(OnEffectComplete); |
| | | } |
| | | } |
| | | |
| | | private void OnEffectComplete(Component comp) |
| | | { |
| | | this.DoWaitStop(); |
| | | if (isReleaseImmediately) |
| | | Stop(); |
| | | } |
| | | |
| | | |
| | | // 创建后的特效会自动隐藏 需要手动调用Play才能播放 |
| | | public static EffectPlayer Create(int effectId, Transform parent, bool createNewChild = false) |
| | | { |
| | | // 直接创建特效播放器,不使用对象池 |
| | | EffectPlayer effectPlayer = null; |
| | | |
| | | if (createNewChild) |
| | |
| | | else |
| | | { |
| | | effectPlayer = parent.AddMissingComponent<EffectPlayer>(); |
| | | effectPlayer.effectId = effectId; |
| | | } |
| | | |
| | | effectPlayer.effectId = effectId; |
| | | effectPlayer.SetActive(true); |
| | | return effectPlayer; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置游戏对象激活状态 |
| | | // /// </summary> |
| | | // public void SetActive(bool active) |
| | | // { |
| | | // if (gameObject != null) |
| | | // { |
| | | // gameObject.SetActive(active); |
| | | // } |
| | | // } |
| | | |
| | | public void Pause() |
| | | { |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | using System.Runtime.CompilerServices; |
| | | using UnityEngine; |
| | | |
| | | //设置特效播放时间 和 循环,方便代码调用,不用去判断特效内部情况,可以把这个文件给外包 |
| | | public class EffectTime : MonoBehaviour |
| | | { |
| | | //播放时长 |
| | | [Header("单次播放总时长")] |
| | | public float playTime = 1f; |
| | | [Header("是否循环特效")] |
| | | public bool isLoop = false; |
| | | |
| | | } |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/Component/UI/Effect/EffectTime.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: f9909a1ae22dbb74099685649d44aa29 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
New file |
| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Spine.Unity; |
| | | using UnityEngine; |
| | | using Spine; |
| | | using UnityEngine.UI; |
| | | |
| | | //UI特效播放器,spine特效直接加载无需提前做预制体 |
| | | //UI特效大部分情况不会改变特效,无需销毁 |
| | | public class UIEffectPlayer : EffectPlayer |
| | | { |
| | | |
| | | [Header("是否循环播放spine特效")] |
| | | public bool isPlaySpineLoop = false; |
| | | |
| | | [Header("是否在显示时播放")] |
| | | public bool isPlayOnEnable = false; |
| | | |
| | | protected override void OnEnable() |
| | | { |
| | | if (isPlayOnEnable) |
| | | { |
| | | Play(false); |
| | | } |
| | | else if (spineComp != null) |
| | | { |
| | | //隐藏,会有静态显示问题 |
| | | spineComp.enabled = false; |
| | | } |
| | | } |
| | | |
| | | public override void Play(bool showLog = true) |
| | | { |
| | | if (!isInit) |
| | | { |
| | | InitComponent(showLog); |
| | | isInit = true; |
| | | } |
| | | else |
| | | { |
| | | //避免重复创建 |
| | | if (!this.gameObject.activeSelf) |
| | | { |
| | | this.gameObject.SetActive(true); |
| | | } |
| | | return; |
| | | } |
| | | |
| | | if (EffectMgr.IsNotShowBySetting(effectId)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (null != effectTarget) |
| | | { |
| | | if (pool != null) |
| | | pool.Release(effectTarget); |
| | | effectTarget = null; |
| | | } |
| | | |
| | | if (!this.gameObject.activeSelf) |
| | | { |
| | | this.gameObject.SetActive(true); |
| | | } |
| | | |
| | | // 加载spine特效资源 |
| | | if (effectConfig.isSpine != 0) |
| | | { |
| | | PlaySpineEffect(); |
| | | } |
| | | else |
| | | { |
| | | PlayerEffect(false); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | protected override void PlaySpineEffect() |
| | | { |
| | | if (spineComp.skeletonDataAsset == null) |
| | | { |
| | | //LoadAsset 已经有缓存SkeletonDataAsset |
| | | spineComp.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("UIEffect/" + effectConfig.packageName, effectConfig.fxName + "_SkeletonData"); |
| | | spineComp.raycastTarget = false; |
| | | spineComp.Initialize(true); |
| | | spineAnimationState = spineComp.AnimationState; |
| | | spineAnimationState.Complete -= OnSpineAnimationComplete; |
| | | spineAnimationState.Complete += OnSpineAnimationComplete; |
| | | } |
| | | |
| | | spineComp.enabled = true; |
| | | PlayerFistSpineAnim(); |
| | | } |
| | | |
| | | |
| | | // 播放第一个动画(作为默认动画) |
| | | void PlayerFistSpineAnim() |
| | | { |
| | | spineComp.enabled = true; |
| | | var skeletonData = spineComp.Skeleton.Data; |
| | | if (skeletonData.Animations.Count > 0) |
| | | { |
| | | string defaultAnimationName = skeletonData.Animations.Items[0].Name; |
| | | spineComp.AnimationState.SetAnimation(0, defaultAnimationName, isPlaySpineLoop); |
| | | } |
| | | else |
| | | { |
| | | Debug.LogError("Spine 数据中没有找到任何动画!" + effectConfig.id); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //单次播放完毕就会触发,即使是循环 |
| | | protected override void OnSpineAnimationComplete(Spine.TrackEntry trackEntry) |
| | | { |
| | | if (!isPlaySpineLoop) |
| | | { |
| | | spineComp.enabled = false; |
| | | if (isReleaseImmediately) |
| | | { |
| | | Stop(); |
| | | } |
| | | else |
| | | { |
| | | onComplete?.Invoke(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 创建后的特效会自动隐藏 需要手动调用Play才能播放 |
| | | public static UIEffectPlayer CreateEffect(int effectId, Transform parent, bool createNewChild = false) |
| | | { |
| | | UIEffectPlayer effectPlayer = null; |
| | | |
| | | if (createNewChild) |
| | | { |
| | | GameObject newGo = new GameObject("EffectPlayer_" + effectId); |
| | | newGo.transform.SetParent(parent, false); |
| | | effectPlayer = newGo.AddComponent<UIEffectPlayer>(); |
| | | } |
| | | else |
| | | { |
| | | effectPlayer = parent.AddMissingComponent<UIEffectPlayer>(); |
| | | effectPlayer.effectId = effectId; |
| | | } |
| | | effectPlayer.SetActive(true); |
| | | return effectPlayer; |
| | | } |
| | | |
| | | } |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/Component/UI/Effect/UIEffectPlayer.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: d2a4fa811bba97941bd8ed92c750e271 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | |
| | | typeof(GmCmdConfig),
|
| | | typeof(HeroAwakeConfig),
|
| | | typeof(HeroConfig),
|
| | | typeof(HeroLineupHaloConfig),
|
| | | typeof(HeroQualityAwakeConfig),
|
| | | typeof(HeroQualityBreakConfig),
|
| | | typeof(HeroQualityConfig),
|
| | | typeof(HeroQualityLVConfig),
|
| | | typeof(HeroSkinConfig),
|
| | | typeof(ItemConfig),
|
| | | typeof(KickOutReasonConfig),
|
| | |
| | | ClearConfigDictionary<HeroAwakeConfig>();
|
| | | // 清空 HeroConfig 字典
|
| | | ClearConfigDictionary<HeroConfig>();
|
| | | // 清空 HeroLineupHaloConfig 字典
|
| | | ClearConfigDictionary<HeroLineupHaloConfig>();
|
| | | // 清空 HeroQualityAwakeConfig 字典
|
| | | ClearConfigDictionary<HeroQualityAwakeConfig>();
|
| | | // 清空 HeroQualityBreakConfig 字典
|
| | | ClearConfigDictionary<HeroQualityBreakConfig>();
|
| | | // 清空 HeroQualityConfig 字典
|
| | | ClearConfigDictionary<HeroQualityConfig>();
|
| | | // 清空 HeroQualityLVConfig 字典
|
| | | ClearConfigDictionary<HeroQualityLVConfig>();
|
| | | // 清空 HeroSkinConfig 字典
|
| | | ClearConfigDictionary<HeroSkinConfig>();
|
| | | // 清空 ItemConfig 字典
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 AppointItemConfig : ConfigBase<int, AppointItemConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public int[] LegendAttrID; |
| | | public int[] LegendAttrValue; |
| | | |
| | | 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); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class AppointItemConfig : ConfigBase<int, AppointItemConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public int[] LegendAttrID;
|
| | | public int[] LegendAttrValue;
|
| | |
|
| | | 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); |
| | |
|
| | | if (tables[1].Contains("[")) |
| | | { |
| | | LegendAttrID = JsonMapper.ToObject<int[]>(tables[1]); |
| | |
| | | { |
| | | int.TryParse(LegendAttrIDStringArray[i],out LegendAttrID[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[2].Contains("[")) |
| | | { |
| | | LegendAttrValue = JsonMapper.ToObject<int[]>(tables[2]); |
| | |
| | | { |
| | | int.TryParse(LegendAttrValueStringArray[i],out LegendAttrValue[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 AudioConfig : ConfigBase<int, AudioConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public string Folder; |
| | | public string Audio; |
| | | |
| | | 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); |
| | | |
| | | Folder = tables[1]; |
| | | |
| | | Audio = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class AudioConfig : ConfigBase<int, AudioConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public string Folder;
|
| | | public string Audio;
|
| | |
|
| | | 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); |
| | |
|
| | | Folder = tables[1];
|
| | |
|
| | | Audio = tables[2];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 CTGConfig : ConfigBase<int, CTGConfig> |
| | | { |
| | | |
| | | public int RecordID; |
| | | public string Title; |
| | | public int VipLevel; |
| | | public int TotalBuyCount; |
| | | public int DailyBuyCount; |
| | | public int WeekBuyCount; |
| | | public int MonthBuyCount; |
| | | public int MoneyType; |
| | | public int GainGold; |
| | | public int GainGoldPaper; |
| | | public int FirstGoldPaperPrize; |
| | | public string GainItemList; |
| | | public int[][] SelectItemInfo; |
| | | public string Icon; |
| | | public int PayType; |
| | | public int Percentage; |
| | | |
| | | 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 RecordID); |
| | | |
| | | Title = tables[1]; |
| | | |
| | | int.TryParse(tables[2],out VipLevel); |
| | | |
| | | int.TryParse(tables[3],out TotalBuyCount); |
| | | |
| | | int.TryParse(tables[4],out DailyBuyCount); |
| | | |
| | | int.TryParse(tables[5],out WeekBuyCount); |
| | | |
| | | int.TryParse(tables[6],out MonthBuyCount); |
| | | |
| | | int.TryParse(tables[7],out MoneyType); |
| | | |
| | | int.TryParse(tables[8],out GainGold); |
| | | |
| | | int.TryParse(tables[9],out GainGoldPaper); |
| | | |
| | | int.TryParse(tables[10],out FirstGoldPaperPrize); |
| | | |
| | | GainItemList = tables[11]; |
| | | |
| | | SelectItemInfo = JsonMapper.ToObject<int[][]>(tables[12].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | Icon = tables[13]; |
| | | |
| | | int.TryParse(tables[14],out PayType); |
| | | |
| | | int.TryParse(tables[15],out Percentage); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class CTGConfig : ConfigBase<int, CTGConfig>
|
| | | {
|
| | |
|
| | | public int RecordID;
|
| | | public string Title;
|
| | | public int VipLevel;
|
| | | public int TotalBuyCount;
|
| | | public int DailyBuyCount;
|
| | | public int WeekBuyCount;
|
| | | public int MonthBuyCount;
|
| | | public int MoneyType;
|
| | | public int GainGold;
|
| | | public int GainGoldPaper;
|
| | | public int FirstGoldPaperPrize;
|
| | | public string GainItemList;
|
| | | public int[][] SelectItemInfo;
|
| | | public string Icon;
|
| | | public int PayType;
|
| | | public int Percentage;
|
| | |
|
| | | 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 RecordID); |
| | |
|
| | | Title = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out VipLevel); |
| | |
|
| | | int.TryParse(tables[3],out TotalBuyCount); |
| | |
|
| | | int.TryParse(tables[4],out DailyBuyCount); |
| | |
|
| | | int.TryParse(tables[5],out WeekBuyCount); |
| | |
|
| | | int.TryParse(tables[6],out MonthBuyCount); |
| | |
|
| | | int.TryParse(tables[7],out MoneyType); |
| | |
|
| | | int.TryParse(tables[8],out GainGold); |
| | |
|
| | | int.TryParse(tables[9],out GainGoldPaper); |
| | |
|
| | | int.TryParse(tables[10],out FirstGoldPaperPrize); |
| | |
|
| | | GainItemList = tables[11];
|
| | |
|
| | | SelectItemInfo = JsonMapper.ToObject<int[][]>(tables[12].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | Icon = tables[13];
|
| | |
|
| | | int.TryParse(tables[14],out PayType); |
| | |
|
| | | int.TryParse(tables[15],out Percentage); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 CTGSelectItemConfig : ConfigBase<int, CTGSelectItemConfig> |
| | | { |
| | | |
| | | public int SelectID; |
| | | public int ItemID; |
| | | public int ItemCount; |
| | | |
| | | 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 SelectID); |
| | | |
| | | int.TryParse(tables[1],out ItemID); |
| | | |
| | | int.TryParse(tables[2],out ItemCount); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class CTGSelectItemConfig : ConfigBase<int, CTGSelectItemConfig>
|
| | | {
|
| | |
|
| | | public int SelectID;
|
| | | public int ItemID;
|
| | | public int ItemCount;
|
| | |
|
| | | 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 SelectID); |
| | |
|
| | | int.TryParse(tables[1],out ItemID); |
| | |
|
| | | int.TryParse(tables[2],out ItemCount); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 ChestsAwardConfig : ConfigBase<int, ChestsAwardConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public int BoxID; |
| | | public int BoxLV; |
| | | public string SelectList; |
| | | public string FixedItem; |
| | | public string Probability1; |
| | | public string Probability2; |
| | | public string JobItem; |
| | | |
| | | 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 BoxID); |
| | | |
| | | int.TryParse(tables[2],out BoxLV); |
| | | |
| | | SelectList = tables[3]; |
| | | |
| | | FixedItem = tables[4]; |
| | | |
| | | Probability1 = tables[5]; |
| | | |
| | | Probability2 = tables[6]; |
| | | |
| | | JobItem = tables[7]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class ChestsAwardConfig : ConfigBase<int, ChestsAwardConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public int BoxID;
|
| | | public int BoxLV;
|
| | | public string SelectList;
|
| | | public string FixedItem;
|
| | | public string Probability1;
|
| | | public string Probability2;
|
| | | public string JobItem;
|
| | |
|
| | | 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 BoxID); |
| | |
|
| | | int.TryParse(tables[2],out BoxLV); |
| | |
|
| | | SelectList = tables[3];
|
| | |
|
| | | FixedItem = tables[4];
|
| | |
|
| | | Probability1 = tables[5];
|
| | |
|
| | | Probability2 = tables[6];
|
| | |
|
| | | JobItem = tables[7];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 ChestsConfig : ConfigBase<int, ChestsConfig> |
| | | { |
| | | |
| | | public int BoxID; |
| | | public int ExpendItemID; |
| | | public int ExpendCount; |
| | | public int OpenMoney; |
| | | public int OpenShow; |
| | | |
| | | 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 BoxID); |
| | | |
| | | int.TryParse(tables[1],out ExpendItemID); |
| | | |
| | | int.TryParse(tables[2],out ExpendCount); |
| | | |
| | | int.TryParse(tables[3],out OpenMoney); |
| | | |
| | | int.TryParse(tables[4],out OpenShow); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class ChestsConfig : ConfigBase<int, ChestsConfig>
|
| | | {
|
| | |
|
| | | public int BoxID;
|
| | | public int ExpendItemID;
|
| | | public int ExpendCount;
|
| | | public int OpenMoney;
|
| | | public int OpenShow;
|
| | |
|
| | | 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 BoxID); |
| | |
|
| | | int.TryParse(tables[1],out ExpendItemID); |
| | |
|
| | | int.TryParse(tables[2],out ExpendCount); |
| | |
|
| | | int.TryParse(tables[3],out OpenMoney); |
| | |
|
| | | int.TryParse(tables[4],out OpenShow); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 DienstgradConfig : ConfigBase<int, DienstgradConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public string Name; |
| | | public int Type; |
| | | public int Prescription; |
| | | public string OutTimeDesc; |
| | | public int[] LightType; |
| | | public int[] LightAttribute; |
| | | public string Image; |
| | | public string Content; |
| | | public int[] Skills; |
| | | public int gotoId; |
| | | public int missionId; |
| | | public int order; |
| | | |
| | | 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); |
| | | |
| | | Name = tables[1]; |
| | | |
| | | int.TryParse(tables[2],out Type); |
| | | |
| | | int.TryParse(tables[3],out Prescription); |
| | | |
| | | OutTimeDesc = tables[4]; |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class DienstgradConfig : ConfigBase<int, DienstgradConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public string Name;
|
| | | public int Type;
|
| | | public int Prescription;
|
| | | public string OutTimeDesc;
|
| | | public int[] LightType;
|
| | | public int[] LightAttribute;
|
| | | public string Image;
|
| | | public string Content;
|
| | | public int[] Skills;
|
| | | public int gotoId;
|
| | | public int missionId;
|
| | | public int order;
|
| | |
|
| | | 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); |
| | |
|
| | | Name = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out Type); |
| | |
|
| | | int.TryParse(tables[3],out Prescription); |
| | |
|
| | | OutTimeDesc = tables[4];
|
| | |
|
| | | if (tables[5].Contains("[")) |
| | | { |
| | | LightType = JsonMapper.ToObject<int[]>(tables[5]); |
| | |
| | | { |
| | | int.TryParse(LightTypeStringArray[i],out LightType[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[6].Contains("[")) |
| | | { |
| | | LightAttribute = JsonMapper.ToObject<int[]>(tables[6]); |
| | |
| | | { |
| | | int.TryParse(LightAttributeStringArray[i],out LightAttribute[i]); |
| | | } |
| | | } |
| | | |
| | | Image = tables[7]; |
| | | |
| | | Content = tables[8]; |
| | | |
| | | }
|
| | |
|
| | | Image = tables[7];
|
| | |
|
| | | Content = tables[8];
|
| | |
|
| | | if (tables[9].Contains("[")) |
| | | { |
| | | Skills = JsonMapper.ToObject<int[]>(tables[9]); |
| | |
| | | { |
| | | int.TryParse(SkillsStringArray[i],out Skills[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[10],out gotoId); |
| | | |
| | | int.TryParse(tables[11],out missionId); |
| | | |
| | | int.TryParse(tables[12],out order); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[10],out gotoId); |
| | |
|
| | | int.TryParse(tables[11],out missionId); |
| | |
|
| | | int.TryParse(tables[12],out order); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 DirtyWordConfig : ConfigBase<int, DirtyWordConfig> |
| | | { |
| | | |
| | | public int id; |
| | | public string word; |
| | | |
| | | 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); |
| | | |
| | | word = tables[1]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class DirtyWordConfig : ConfigBase<int, DirtyWordConfig>
|
| | | {
|
| | |
|
| | | public int id;
|
| | | public string word;
|
| | |
|
| | | 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); |
| | |
|
| | | word = tables[1];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月22日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class EffectConfig : ConfigBase<int, EffectConfig> |
| | | { |
| | | |
| | | public int id; |
| | | public string packageName; |
| | | public int isSpine; |
| | | public string fxName; |
| | | public int audio; |
| | | public string nodeName; |
| | | public int notShow; |
| | | public int autoDestroy; |
| | | public float destroyDelay; |
| | | |
| | | 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); |
| | | |
| | | packageName = tables[1]; |
| | | |
| | | int.TryParse(tables[2],out isSpine); |
| | | |
| | | fxName = tables[3]; |
| | | |
| | | int.TryParse(tables[4],out audio); |
| | | |
| | | nodeName = tables[5]; |
| | | |
| | | int.TryParse(tables[6],out notShow); |
| | | |
| | | int.TryParse(tables[7],out autoDestroy); |
| | | |
| | | float.TryParse(tables[8],out destroyDelay); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class EffectConfig : ConfigBase<int, EffectConfig>
|
| | | {
|
| | |
|
| | | public int id;
|
| | | public string packageName;
|
| | | public int isSpine;
|
| | | public string fxName;
|
| | | public int audio;
|
| | | public string nodeName;
|
| | | public int notShow;
|
| | | public int autoDestroy;
|
| | | public float destroyDelay;
|
| | |
|
| | | 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); |
| | |
|
| | | packageName = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out isSpine); |
| | |
|
| | | fxName = tables[3];
|
| | |
|
| | | int.TryParse(tables[4],out audio); |
| | |
|
| | | nodeName = tables[5];
|
| | |
|
| | | int.TryParse(tables[6],out notShow); |
| | |
|
| | | int.TryParse(tables[7],out autoDestroy); |
| | |
|
| | | float.TryParse(tables[8],out destroyDelay); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 EmojiPackConfig : ConfigBase<int, EmojiPackConfig> |
| | | { |
| | | |
| | | public int EmojiPackID; |
| | | public string Name; |
| | | public int UnlockDefault; |
| | | public int ExpireMinutes; |
| | | public string Image; |
| | | public int SortNum; |
| | | public int EffectID; |
| | | public int[][] UnlockNeedItemList; |
| | | public string Descriptive; |
| | | |
| | | 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 EmojiPackID); |
| | | |
| | | Name = tables[1]; |
| | | |
| | | int.TryParse(tables[2],out UnlockDefault); |
| | | |
| | | int.TryParse(tables[3],out ExpireMinutes); |
| | | |
| | | Image = tables[4]; |
| | | |
| | | int.TryParse(tables[5],out SortNum); |
| | | |
| | | int.TryParse(tables[6],out EffectID); |
| | | |
| | | UnlockNeedItemList = JsonMapper.ToObject<int[][]>(tables[7].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | Descriptive = tables[8]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class EmojiPackConfig : ConfigBase<int, EmojiPackConfig>
|
| | | {
|
| | |
|
| | | public int EmojiPackID;
|
| | | public string Name;
|
| | | public int UnlockDefault;
|
| | | public int ExpireMinutes;
|
| | | public string Image;
|
| | | public int SortNum;
|
| | | public int EffectID;
|
| | | public int[][] UnlockNeedItemList;
|
| | | public string Descriptive;
|
| | |
|
| | | 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 EmojiPackID); |
| | |
|
| | | Name = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out UnlockDefault); |
| | |
|
| | | int.TryParse(tables[3],out ExpireMinutes); |
| | |
|
| | | Image = tables[4];
|
| | |
|
| | | int.TryParse(tables[5],out SortNum); |
| | |
|
| | | int.TryParse(tables[6],out EffectID); |
| | |
|
| | | UnlockNeedItemList = JsonMapper.ToObject<int[][]>(tables[7].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | Descriptive = tables[8];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月7日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class FaceConfig : ConfigBase<string, FaceConfig> |
| | | { |
| | | |
| | | public string name; |
| | | public int frameCnt; |
| | | public int speed; |
| | | public int frameType; |
| | | public int EmojiPackID; |
| | | public string folder; |
| | | |
| | | public override string LoadKey(string _key) |
| | | { |
| | | string key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | name = tables[0]; |
| | | |
| | | int.TryParse(tables[1],out frameCnt); |
| | | |
| | | int.TryParse(tables[2],out speed); |
| | | |
| | | int.TryParse(tables[3],out frameType); |
| | | |
| | | int.TryParse(tables[4],out EmojiPackID); |
| | | |
| | | folder = tables[5]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class FaceConfig : ConfigBase<string, FaceConfig>
|
| | | {
|
| | |
|
| | | public string name;
|
| | | public int frameCnt;
|
| | | public int speed;
|
| | | public int frameType;
|
| | | public int EmojiPackID;
|
| | | public string folder;
|
| | |
|
| | | public override string LoadKey(string _key)
|
| | | {
|
| | | string key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | name = tables[0];
|
| | |
|
| | | int.TryParse(tables[1],out frameCnt); |
| | |
|
| | | int.TryParse(tables[2],out speed); |
| | |
|
| | | int.TryParse(tables[3],out frameType); |
| | |
|
| | | int.TryParse(tables[4],out EmojiPackID); |
| | |
|
| | | folder = tables[5];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年6月30日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class FrameAnimationConfig : ConfigBase<string, FrameAnimationConfig> |
| | | { |
| | | |
| | | public string name; |
| | | public int frameCnt; |
| | | public int speed; |
| | | public int frameType; |
| | | public int EmojiPackID; |
| | | public string folder; |
| | | |
| | | public override string LoadKey(string _key) |
| | | { |
| | | string key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | name = tables[0]; |
| | | |
| | | int.TryParse(tables[1],out frameCnt); |
| | | |
| | | int.TryParse(tables[2],out speed); |
| | | |
| | | int.TryParse(tables[3],out frameType); |
| | | |
| | | int.TryParse(tables[4],out EmojiPackID); |
| | | |
| | | folder = tables[5]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class FrameAnimationConfig : ConfigBase<string, FrameAnimationConfig>
|
| | | {
|
| | |
|
| | | public string name;
|
| | | public int frameCnt;
|
| | | public int speed;
|
| | | public int frameType;
|
| | | public int EmojiPackID;
|
| | | public string folder;
|
| | |
|
| | | public override string LoadKey(string _key)
|
| | | {
|
| | | string key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | name = tables[0];
|
| | |
|
| | | int.TryParse(tables[1],out frameCnt); |
| | |
|
| | | int.TryParse(tables[2],out speed); |
| | |
|
| | | int.TryParse(tables[3],out frameType); |
| | |
|
| | | int.TryParse(tables[4],out EmojiPackID); |
| | |
|
| | | folder = tables[5];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 FuncConfigConfig : ConfigBase<string, FuncConfigConfig> |
| | | { |
| | | |
| | | public string KEY; |
| | | public string Numerical1; |
| | | public string Numerical2; |
| | | public string Numerical3; |
| | | public string Numerical4; |
| | | public string Numerical5; |
| | | |
| | | public override string LoadKey(string _key) |
| | | { |
| | | string key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | KEY = tables[0]; |
| | | |
| | | Numerical1 = tables[1]; |
| | | |
| | | Numerical2 = tables[2]; |
| | | |
| | | Numerical3 = tables[3]; |
| | | |
| | | Numerical4 = tables[4]; |
| | | |
| | | Numerical5 = tables[5]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class FuncConfigConfig : ConfigBase<string, FuncConfigConfig>
|
| | | {
|
| | |
|
| | | public string KEY;
|
| | | public string Numerical1;
|
| | | public string Numerical2;
|
| | | public string Numerical3;
|
| | | public string Numerical4;
|
| | | public string Numerical5;
|
| | |
|
| | | public override string LoadKey(string _key)
|
| | | {
|
| | | string key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | KEY = tables[0];
|
| | |
|
| | | Numerical1 = tables[1];
|
| | |
|
| | | Numerical2 = tables[2];
|
| | |
|
| | | Numerical3 = tables[3];
|
| | |
|
| | | Numerical4 = tables[4];
|
| | |
|
| | | Numerical5 = tables[5];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 FuncOpenLVConfig : ConfigBase<int, FuncOpenLVConfig> |
| | | { |
| | | |
| | | public int FuncId; |
| | | public int LimitLV; |
| | | public int LimitMagicWeapon; |
| | | public int LimiRealmLV; |
| | | public int LimitMissionID; |
| | | public string Remark; |
| | | public string State; |
| | | public string Tip; |
| | | public string Icon; |
| | | public int open; |
| | | public int ContinueTask; |
| | | |
| | | 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 FuncId); |
| | | |
| | | int.TryParse(tables[1],out LimitLV); |
| | | |
| | | int.TryParse(tables[2],out LimitMagicWeapon); |
| | | |
| | | int.TryParse(tables[3],out LimiRealmLV); |
| | | |
| | | int.TryParse(tables[4],out LimitMissionID); |
| | | |
| | | Remark = tables[5]; |
| | | |
| | | State = tables[6]; |
| | | |
| | | Tip = tables[7]; |
| | | |
| | | Icon = tables[8]; |
| | | |
| | | int.TryParse(tables[9],out open); |
| | | |
| | | int.TryParse(tables[10],out ContinueTask); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class FuncOpenLVConfig : ConfigBase<int, FuncOpenLVConfig>
|
| | | {
|
| | |
|
| | | public int FuncId;
|
| | | public int LimitLV;
|
| | | public int LimitMagicWeapon;
|
| | | public int LimiRealmLV;
|
| | | public int LimitMissionID;
|
| | | public string Remark;
|
| | | public string State;
|
| | | public string Tip;
|
| | | public string Icon;
|
| | | public int open;
|
| | | public int ContinueTask;
|
| | |
|
| | | 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 FuncId); |
| | |
|
| | | int.TryParse(tables[1],out LimitLV); |
| | |
|
| | | int.TryParse(tables[2],out LimitMagicWeapon); |
| | |
|
| | | int.TryParse(tables[3],out LimiRealmLV); |
| | |
|
| | | int.TryParse(tables[4],out LimitMissionID); |
| | |
|
| | | Remark = tables[5];
|
| | |
|
| | | State = tables[6];
|
| | |
|
| | | Tip = tables[7];
|
| | |
|
| | | Icon = tables[8];
|
| | |
|
| | | int.TryParse(tables[9],out open); |
| | |
|
| | | int.TryParse(tables[10],out ContinueTask); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 FunctionTeamSetConfig : ConfigBase<int, FunctionTeamSetConfig> |
| | | { |
| | | |
| | | public int FuncMapID; |
| | | public int NeedName; |
| | | public int MemberMax; |
| | | public int ApplyMax; |
| | | public int ReqApplyMax; |
| | | public int SortType; |
| | | public int SortReverse; |
| | | public int OPLimitInAct; |
| | | |
| | | 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 FuncMapID); |
| | | |
| | | int.TryParse(tables[1],out NeedName); |
| | | |
| | | int.TryParse(tables[2],out MemberMax); |
| | | |
| | | int.TryParse(tables[3],out ApplyMax); |
| | | |
| | | int.TryParse(tables[4],out ReqApplyMax); |
| | | |
| | | int.TryParse(tables[5],out SortType); |
| | | |
| | | int.TryParse(tables[6],out SortReverse); |
| | | |
| | | int.TryParse(tables[7],out OPLimitInAct); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class FunctionTeamSetConfig : ConfigBase<int, FunctionTeamSetConfig>
|
| | | {
|
| | |
|
| | | public int FuncMapID;
|
| | | public int NeedName;
|
| | | public int MemberMax;
|
| | | public int ApplyMax;
|
| | | public int ReqApplyMax;
|
| | | public int SortType;
|
| | | public int SortReverse;
|
| | | public int OPLimitInAct;
|
| | |
|
| | | 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 FuncMapID); |
| | |
|
| | | int.TryParse(tables[1],out NeedName); |
| | |
|
| | | int.TryParse(tables[2],out MemberMax); |
| | |
|
| | | int.TryParse(tables[3],out ApplyMax); |
| | |
|
| | | int.TryParse(tables[4],out ReqApplyMax); |
| | |
|
| | | int.TryParse(tables[5],out SortType); |
| | |
|
| | | int.TryParse(tables[6],out SortReverse); |
| | |
|
| | | int.TryParse(tables[7],out OPLimitInAct); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 GetItemWaysConfig : ConfigBase<int, GetItemWaysConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public string name; |
| | | public string Icon; |
| | | public string Text; |
| | | public int OpenpanelId; |
| | | public int FuncOpenId; |
| | | public int ActiveType; |
| | | public int customize; |
| | | |
| | | 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); |
| | | |
| | | name = tables[1]; |
| | | |
| | | Icon = tables[2]; |
| | | |
| | | Text = tables[3]; |
| | | |
| | | int.TryParse(tables[4],out OpenpanelId); |
| | | |
| | | int.TryParse(tables[5],out FuncOpenId); |
| | | |
| | | int.TryParse(tables[6],out ActiveType); |
| | | |
| | | int.TryParse(tables[7],out customize); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class GetItemWaysConfig : ConfigBase<int, GetItemWaysConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public string name;
|
| | | public string Icon;
|
| | | public string Text;
|
| | | public int OpenpanelId;
|
| | | public int FuncOpenId;
|
| | | public int ActiveType;
|
| | | public int customize;
|
| | |
|
| | | 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); |
| | |
|
| | | name = tables[1];
|
| | |
|
| | | Icon = tables[2];
|
| | |
|
| | | Text = tables[3];
|
| | |
|
| | | int.TryParse(tables[4],out OpenpanelId); |
| | |
|
| | | int.TryParse(tables[5],out FuncOpenId); |
| | |
|
| | | int.TryParse(tables[6],out ActiveType); |
| | |
|
| | | int.TryParse(tables[7],out customize); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 GmCmdConfig : ConfigBase<int, GmCmdConfig> |
| | | { |
| | | |
| | | public int Id; |
| | | public string Cmd; |
| | | public string ParamSet; |
| | | |
| | | 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); |
| | | |
| | | Cmd = tables[1]; |
| | | |
| | | ParamSet = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class GmCmdConfig : ConfigBase<int, GmCmdConfig>
|
| | | {
|
| | |
|
| | | public int Id;
|
| | | public string Cmd;
|
| | | public string ParamSet;
|
| | |
|
| | | 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); |
| | |
|
| | | Cmd = tables[1];
|
| | |
|
| | | ParamSet = tables[2];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 GuideConfig : ConfigBase<int, GuideConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public int Type; |
| | | public int TriggerType; |
| | | public int Condition; |
| | | public int SupplementCondition; |
| | | public int PreGuideId; |
| | | public int[] Steps; |
| | | public int CanSkip; |
| | | public int RemoveWhenOtherGuide; |
| | | public int CannotCompleteByClick; |
| | | public int[] UnfoldAreas; |
| | | public int AutoCompleteTime; |
| | | |
| | | 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 Type); |
| | | |
| | | int.TryParse(tables[2],out TriggerType); |
| | | |
| | | int.TryParse(tables[3],out Condition); |
| | | |
| | | int.TryParse(tables[4],out SupplementCondition); |
| | | |
| | | int.TryParse(tables[5],out PreGuideId); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class GuideConfig : ConfigBase<int, GuideConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public int Type;
|
| | | public int TriggerType;
|
| | | public int Condition;
|
| | | public int SupplementCondition;
|
| | | public int PreGuideId;
|
| | | public int[] Steps;
|
| | | public int CanSkip;
|
| | | public int RemoveWhenOtherGuide;
|
| | | public int CannotCompleteByClick;
|
| | | public int[] UnfoldAreas;
|
| | | public int AutoCompleteTime;
|
| | |
|
| | | 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 Type); |
| | |
|
| | | int.TryParse(tables[2],out TriggerType); |
| | |
|
| | | int.TryParse(tables[3],out Condition); |
| | |
|
| | | int.TryParse(tables[4],out SupplementCondition); |
| | |
|
| | | int.TryParse(tables[5],out PreGuideId); |
| | |
|
| | | if (tables[6].Contains("[")) |
| | | { |
| | | Steps = JsonMapper.ToObject<int[]>(tables[6]); |
| | |
| | | { |
| | | int.TryParse(StepsStringArray[i],out Steps[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[7],out CanSkip); |
| | | |
| | | int.TryParse(tables[8],out RemoveWhenOtherGuide); |
| | | |
| | | int.TryParse(tables[9],out CannotCompleteByClick); |
| | | |
| | | }
|
| | |
|
| | | int.TryParse(tables[7],out CanSkip); |
| | |
|
| | | int.TryParse(tables[8],out RemoveWhenOtherGuide); |
| | |
|
| | | int.TryParse(tables[9],out CannotCompleteByClick); |
| | |
|
| | | if (tables[10].Contains("[")) |
| | | { |
| | | UnfoldAreas = JsonMapper.ToObject<int[]>(tables[10]); |
| | |
| | | { |
| | | int.TryParse(UnfoldAreasStringArray[i],out UnfoldAreas[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[11],out AutoCompleteTime); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[11],out AutoCompleteTime); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 HeroAwakeConfig : ConfigBase<int, HeroAwakeConfig> |
| | | { |
| | | |
| | | public int TalentAwakeID; |
| | | public int HeroID; |
| | | public int AwakeLV; |
| | | public int[] AttrIDList; |
| | | public int[] AttrValueList; |
| | | public int SkillID; |
| | | public int UnlockTalentSlot; |
| | | public int AddStarUpper; |
| | | |
| | | 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 TalentAwakeID); |
| | | |
| | | int.TryParse(tables[1],out HeroID); |
| | | |
| | | int.TryParse(tables[2],out AwakeLV); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroAwakeConfig : ConfigBase<int, HeroAwakeConfig>
|
| | | {
|
| | |
|
| | | public int TalentAwakeID;
|
| | | public int HeroID;
|
| | | public int AwakeLV;
|
| | | public int[] AttrIDList;
|
| | | public int[] AttrValueList;
|
| | | public int SkillID;
|
| | | public int UnlockTalentSlot;
|
| | | public int AddStarUpper;
|
| | |
|
| | | 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 TalentAwakeID); |
| | |
|
| | | int.TryParse(tables[1],out HeroID); |
| | |
|
| | | int.TryParse(tables[2],out AwakeLV); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(AttrValueListStringArray[i],out AttrValueList[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[5],out SkillID); |
| | | |
| | | int.TryParse(tables[6],out UnlockTalentSlot); |
| | | |
| | | int.TryParse(tables[7],out AddStarUpper); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[5],out SkillID); |
| | |
|
| | | int.TryParse(tables[6],out UnlockTalentSlot); |
| | |
|
| | | int.TryParse(tables[7],out AddStarUpper); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 HeroBreakConfig : ConfigBase<int, HeroBreakConfig> |
| | | { |
| | | |
| | | public int BreakID; |
| | | public int HeroID; |
| | | public int BreakLV; |
| | | public int[] AttrIDList; |
| | | public int[] AttrValueList; |
| | | public int SkillID; |
| | | |
| | | 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 BreakID); |
| | | |
| | | int.TryParse(tables[1],out HeroID); |
| | | |
| | | int.TryParse(tables[2],out BreakLV); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroBreakConfig : ConfigBase<int, HeroBreakConfig>
|
| | | {
|
| | |
|
| | | public int BreakID;
|
| | | public int HeroID;
|
| | | public int BreakLV;
|
| | | public int[] AttrIDList;
|
| | | public int[] AttrValueList;
|
| | | public int SkillID;
|
| | |
|
| | | 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 BreakID); |
| | |
|
| | | int.TryParse(tables[1],out HeroID); |
| | |
|
| | | int.TryParse(tables[2],out BreakLV); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(AttrValueListStringArray[i],out AttrValueList[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[5],out SkillID); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[5],out SkillID); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月18日
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 HeroFetterConfig : ConfigBase<int, HeroFetterConfig> |
| | | { |
| | | |
| | | public int FetterID; |
| | | public string FetterName; |
| | | public int[] HeroIDList; |
| | | public int[] AttrIDList; |
| | | public int[] AttrValueList; |
| | | |
| | | 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 FetterID); |
| | | |
| | | FetterName = tables[1]; |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroFetterConfig : ConfigBase<int, HeroFetterConfig>
|
| | | {
|
| | |
|
| | | public int FetterID;
|
| | | public string FetterName;
|
| | | public int[] HeroIDList;
|
| | | public int[] AttrIDList;
|
| | | public int[] AttrValueList;
|
| | |
|
| | | 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 FetterID); |
| | |
|
| | | FetterName = tables[1];
|
| | |
|
| | | if (tables[2].Contains("[")) |
| | | { |
| | | HeroIDList = JsonMapper.ToObject<int[]>(tables[2]); |
| | |
| | | { |
| | | int.TryParse(HeroIDListStringArray[i],out HeroIDList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(AttrValueListStringArray[i],out AttrValueList[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroLineupHaloConfig : ConfigBase<int, HeroLineupHaloConfig>
|
| | | {
|
| | |
|
| | | public int Id;
|
| | | public int Country;
|
| | | public int NeedHeroCount;
|
| | | public int[] AttrIDList;
|
| | | public int[] AttrValueList;
|
| | |
|
| | | 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 Country); |
| | |
|
| | | int.TryParse(tables[2],out NeedHeroCount); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | AttrIDList = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] AttrIDListStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AttrIDList = new int[AttrIDListStringArray.Length]; |
| | | for (int i=0;i<AttrIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]); |
| | | } |
| | | }
|
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | AttrValueList = JsonMapper.ToObject<int[]>(tables[4]); |
| | | } |
| | | else |
| | | { |
| | | string[] AttrValueListStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AttrValueList = new int[AttrValueListStringArray.Length]; |
| | | for (int i=0;i<AttrValueListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AttrValueListStringArray[i],out AttrValueList[i]); |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/Config/Configs/HeroLineupHaloConfig.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 8226332450e068a418446db4aab9cb01 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | |
| | | //-------------------------------------------------------- |
| | | // [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 HeroQualityAwakeConfig : ConfigBase<int, HeroQualityAwakeConfig> |
| | | { |
| | | |
| | | public int QualityAwakeID; |
| | | public int Quality; |
| | | public int AwakeLV; |
| | | public int[] UPCostItem; |
| | | |
| | | 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 QualityAwakeID); |
| | | |
| | | int.TryParse(tables[1],out Quality); |
| | | |
| | | int.TryParse(tables[2],out AwakeLV); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroQualityAwakeConfig : ConfigBase<int, HeroQualityAwakeConfig>
|
| | | {
|
| | |
|
| | | public int QualityAwakeID;
|
| | | public int Quality;
|
| | | public int AwakeLV;
|
| | | public int[] UPCostItem;
|
| | |
|
| | | 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 QualityAwakeID); |
| | |
|
| | | int.TryParse(tables[1],out Quality); |
| | |
|
| | | int.TryParse(tables[2],out AwakeLV); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | UPCostItem = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(UPCostItemStringArray[i],out UPCostItem[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 HeroQualityBreakConfig : ConfigBase<int, HeroQualityBreakConfig> |
| | | { |
| | | |
| | | public int QualityBreankID; |
| | | public int Quality; |
| | | public int BreakLV; |
| | | public int LVMax; |
| | | public int[] UPCostItem; |
| | | |
| | | 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 QualityBreankID); |
| | | |
| | | int.TryParse(tables[1],out Quality); |
| | | |
| | | int.TryParse(tables[2],out BreakLV); |
| | | |
| | | int.TryParse(tables[3],out LVMax); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroQualityBreakConfig : ConfigBase<int, HeroQualityBreakConfig>
|
| | | {
|
| | |
|
| | | public int QualityBreankID;
|
| | | public int Quality;
|
| | | public int BreakLV;
|
| | | public int LVMax;
|
| | | public int[] UPCostItem;
|
| | |
|
| | | 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 QualityBreankID); |
| | |
|
| | | int.TryParse(tables[1],out Quality); |
| | |
|
| | | int.TryParse(tables[2],out BreakLV); |
| | |
|
| | | int.TryParse(tables[3],out LVMax); |
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | UPCostItem = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(UPCostItemStringArray[i],out UPCostItem[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 HeroQualityConfig : ConfigBase<int, HeroQualityConfig> |
| | | { |
| | | |
| | | public int Quality; |
| | | public int[] UPCostItem; |
| | | public int InitStarUpper; |
| | | public int InitAddPer; |
| | | public int LVAddPer; |
| | | public int BreakLVAddPer; |
| | | public int StarAddPer; |
| | | public int[] BookActAwardMoney; |
| | | public int BookInitAddPer; |
| | | public int BookStarAddPer; |
| | | public int BookBreakLVAddPer; |
| | | |
| | | 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 Quality); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroQualityConfig : ConfigBase<int, HeroQualityConfig>
|
| | | {
|
| | |
|
| | | public int Quality;
|
| | | public int[] UPCostItem;
|
| | | public int InitStarUpper;
|
| | | public int InitAddPer;
|
| | | public int LVAddPer;
|
| | | public int BreakLVAddPer;
|
| | | public int StarAddPer;
|
| | | public int[] BookActAwardMoney;
|
| | | public int BookInitAddPer;
|
| | | public int BookStarAddPer;
|
| | | public int BookBreakLVAddPer;
|
| | |
|
| | | 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 Quality); |
| | |
|
| | | if (tables[1].Contains("[")) |
| | | { |
| | | UPCostItem = JsonMapper.ToObject<int[]>(tables[1]); |
| | |
| | | { |
| | | int.TryParse(UPCostItemStringArray[i],out UPCostItem[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[2],out InitStarUpper); |
| | | |
| | | int.TryParse(tables[3],out InitAddPer); |
| | | |
| | | int.TryParse(tables[4],out LVAddPer); |
| | | |
| | | int.TryParse(tables[5],out BreakLVAddPer); |
| | | |
| | | int.TryParse(tables[6],out StarAddPer); |
| | | |
| | | }
|
| | |
|
| | | int.TryParse(tables[2],out InitStarUpper); |
| | |
|
| | | int.TryParse(tables[3],out InitAddPer); |
| | |
|
| | | int.TryParse(tables[4],out LVAddPer); |
| | |
|
| | | int.TryParse(tables[5],out BreakLVAddPer); |
| | |
|
| | | int.TryParse(tables[6],out StarAddPer); |
| | |
|
| | | if (tables[7].Contains("[")) |
| | | { |
| | | BookActAwardMoney = JsonMapper.ToObject<int[]>(tables[7]); |
| | |
| | | { |
| | | int.TryParse(BookActAwardMoneyStringArray[i],out BookActAwardMoney[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[8],out BookInitAddPer); |
| | | |
| | | int.TryParse(tables[9],out BookStarAddPer); |
| | | |
| | | int.TryParse(tables[10],out BookBreakLVAddPer); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[8],out BookInitAddPer); |
| | |
|
| | | int.TryParse(tables[9],out BookStarAddPer); |
| | |
|
| | | int.TryParse(tables[10],out BookBreakLVAddPer); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class HeroQualityLVConfig : ConfigBase<int, HeroQualityLVConfig>
|
| | | {
|
| | |
|
| | | public int Id;
|
| | | public int Quality;
|
| | | public int HeroLV;
|
| | | public int[] UPCostItem;
|
| | |
|
| | | 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 Quality); |
| | |
|
| | | int.TryParse(tables[2],out HeroLV); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | UPCostItem = JsonMapper.ToObject<int[]>(tables[3]); |
| | | } |
| | | else |
| | | { |
| | | string[] UPCostItemStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | UPCostItem = new int[UPCostItemStringArray.Length]; |
| | | for (int i=0;i<UPCostItemStringArray.Length;i++) |
| | | { |
| | | int.TryParse(UPCostItemStringArray[i],out UPCostItem[i]); |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/Config/Configs/HeroQualityLVConfig.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: b0e2a9b5d4828284eb6dad12646b416c |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月18日
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月11日
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 IconConfig : ConfigBase<string, IconConfig> |
| | | { |
| | | |
| | | public string id; |
| | | public string folder; |
| | | public string sprite; |
| | | |
| | | public override string LoadKey(string _key) |
| | | { |
| | | string key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | id = tables[0]; |
| | | |
| | | folder = tables[1]; |
| | | |
| | | sprite = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class IconConfig : ConfigBase<string, IconConfig>
|
| | | {
|
| | |
|
| | | public string id;
|
| | | public string folder;
|
| | | public string sprite;
|
| | |
|
| | | public override string LoadKey(string _key)
|
| | | {
|
| | | string key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | id = tables[0];
|
| | |
|
| | | folder = tables[1];
|
| | |
|
| | | sprite = tables[2];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 InitialFunctionConfig : ConfigBase<string, InitialFunctionConfig> |
| | | { |
| | | |
| | | public string KEY; |
| | | public string Numerical1; |
| | | public string Numerical2; |
| | | public string Numerical3; |
| | | public string Numerical4; |
| | | public string Numerical5; |
| | | |
| | | public override string LoadKey(string _key) |
| | | { |
| | | string key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | KEY = tables[0]; |
| | | |
| | | Numerical1 = tables[1]; |
| | | |
| | | Numerical2 = tables[2]; |
| | | |
| | | Numerical3 = tables[3]; |
| | | |
| | | Numerical4 = tables[4]; |
| | | |
| | | Numerical5 = tables[5]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class InitialFunctionConfig : ConfigBase<string, InitialFunctionConfig>
|
| | | {
|
| | |
|
| | | public string KEY;
|
| | | public string Numerical1;
|
| | | public string Numerical2;
|
| | | public string Numerical3;
|
| | | public string Numerical4;
|
| | | public string Numerical5;
|
| | |
|
| | | public override string LoadKey(string _key)
|
| | | {
|
| | | string key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | KEY = tables[0];
|
| | |
|
| | | Numerical1 = tables[1];
|
| | |
|
| | | Numerical2 = tables[2];
|
| | |
|
| | | Numerical3 = tables[3];
|
| | |
|
| | | Numerical4 = tables[4];
|
| | |
|
| | | Numerical5 = tables[5];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 ItemConfig : ConfigBase<int, ItemConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public int LV; |
| | | public string ItemName; |
| | | public int Type; |
| | | public int EquipPlace; |
| | | public int CanRepair; |
| | | public int PackCount; |
| | | public int UseLV; |
| | | public int CanSell; |
| | | public int CanTrade; |
| | | public int[] JumpComposeCondi; |
| | | public int CanDrop; |
| | | public int CanBind; |
| | | public int CDTypeEx; |
| | | public int CDType; |
| | | public int CDTime; |
| | | public int GoldPrice; |
| | | public int GoldPaperPrice; |
| | | public int SilverPrice; |
| | | public int UseTag; |
| | | public int Effect1; |
| | | public int EffectValueA1; |
| | | public int EffectValueB1; |
| | | public int EffectValueC1; |
| | | public int Effect2; |
| | | public int EffectValueA2; |
| | | public int EffectValueB2; |
| | | public int EffectValueC2; |
| | | public int Effect3; |
| | | public int EffectValueA3; |
| | | public int EffectValueB3; |
| | | public int EffectValueC3; |
| | | public int Effect4; |
| | | public int EffectValueA4; |
| | | public int EffectValueB4; |
| | | public int EffectValueC4; |
| | | public int Effect5; |
| | | public int EffectValueA5; |
| | | public int EffectValueB5; |
| | | public int EffectValueC5; |
| | | public int AddSkill1; |
| | | public int AddSkill2; |
| | | public int JobLimit; |
| | | public int RealmLimit; |
| | | public int ItemColor; |
| | | public int StarLevel; |
| | | public int MaxHoleCount; |
| | | public int CanBreak; |
| | | public int MaxEndure; |
| | | public int EndureReduceType; |
| | | public int BindType; |
| | | public int MaxSkillCnt; |
| | | public int ExpireTime; |
| | | public int MaxFitLV; |
| | | public int SuiteiD; |
| | | public string DropinstantEffName; |
| | | public string IconKey; |
| | | public int ChangeOrd; |
| | | public string Description; |
| | | public string QualityName; |
| | | public int QualityEchoType; |
| | | public int LimitSTR; |
| | | public int LimitPHY; |
| | | public int LimitPNE; |
| | | public string Template; |
| | | public int DropItemPattern; |
| | | public int SellTip; |
| | | public int BatchUse; |
| | | public int Jump; |
| | | public int[] GetWay; |
| | | public string ItemTypeName; |
| | | public int[] UseCondiType; |
| | | public int BaseEffectID; |
| | | |
| | | 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 LV); |
| | | |
| | | ItemName = tables[2]; |
| | | |
| | | int.TryParse(tables[3],out Type); |
| | | |
| | | int.TryParse(tables[4],out EquipPlace); |
| | | |
| | | int.TryParse(tables[5],out CanRepair); |
| | | |
| | | int.TryParse(tables[6],out PackCount); |
| | | |
| | | int.TryParse(tables[7],out UseLV); |
| | | |
| | | int.TryParse(tables[8],out CanSell); |
| | | |
| | | int.TryParse(tables[9],out CanTrade); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class ItemConfig : ConfigBase<int, ItemConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public int LV;
|
| | | public string ItemName;
|
| | | public int Type;
|
| | | public int EquipPlace;
|
| | | public int CanRepair;
|
| | | public int PackCount;
|
| | | public int UseLV;
|
| | | public int CanSell;
|
| | | public int CanTrade;
|
| | | public int[] JumpComposeCondi;
|
| | | public int CanDrop;
|
| | | public int CanBind;
|
| | | public int CDTypeEx;
|
| | | public int CDType;
|
| | | public int CDTime;
|
| | | public int GoldPrice;
|
| | | public int GoldPaperPrice;
|
| | | public int SilverPrice;
|
| | | public int UseTag;
|
| | | public int Effect1;
|
| | | public int EffectValueA1;
|
| | | public int EffectValueB1;
|
| | | public int EffectValueC1;
|
| | | public int Effect2;
|
| | | public int EffectValueA2;
|
| | | public int EffectValueB2;
|
| | | public int EffectValueC2;
|
| | | public int Effect3;
|
| | | public int EffectValueA3;
|
| | | public int EffectValueB3;
|
| | | public int EffectValueC3;
|
| | | public int Effect4;
|
| | | public int EffectValueA4;
|
| | | public int EffectValueB4;
|
| | | public int EffectValueC4;
|
| | | public int Effect5;
|
| | | public int EffectValueA5;
|
| | | public int EffectValueB5;
|
| | | public int EffectValueC5;
|
| | | public int AddSkill1;
|
| | | public int AddSkill2;
|
| | | public int JobLimit;
|
| | | public int RealmLimit;
|
| | | public int ItemColor;
|
| | | public int StarLevel;
|
| | | public int MaxHoleCount;
|
| | | public int CanBreak;
|
| | | public int MaxEndure;
|
| | | public int EndureReduceType;
|
| | | public int BindType;
|
| | | public int MaxSkillCnt;
|
| | | public int ExpireTime;
|
| | | public int MaxFitLV;
|
| | | public int SuiteiD;
|
| | | public string DropinstantEffName;
|
| | | public string IconKey;
|
| | | public int ChangeOrd;
|
| | | public string Description;
|
| | | public string QualityName;
|
| | | public int QualityEchoType;
|
| | | public int LimitSTR;
|
| | | public int LimitPHY;
|
| | | public int LimitPNE;
|
| | | public string Template;
|
| | | public int DropItemPattern;
|
| | | public int SellTip;
|
| | | public int BatchUse;
|
| | | public int Jump;
|
| | | public int[] GetWay;
|
| | | public string ItemTypeName;
|
| | | public int[] UseCondiType;
|
| | | public int BaseEffectID;
|
| | |
|
| | | 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 LV); |
| | |
|
| | | ItemName = tables[2];
|
| | |
|
| | | int.TryParse(tables[3],out Type); |
| | |
|
| | | int.TryParse(tables[4],out EquipPlace); |
| | |
|
| | | int.TryParse(tables[5],out CanRepair); |
| | |
|
| | | int.TryParse(tables[6],out PackCount); |
| | |
|
| | | int.TryParse(tables[7],out UseLV); |
| | |
|
| | | int.TryParse(tables[8],out CanSell); |
| | |
|
| | | int.TryParse(tables[9],out CanTrade); |
| | |
|
| | | if (tables[10].Contains("[")) |
| | | { |
| | | JumpComposeCondi = JsonMapper.ToObject<int[]>(tables[10]); |
| | |
| | | { |
| | | int.TryParse(JumpComposeCondiStringArray[i],out JumpComposeCondi[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[11],out CanDrop); |
| | | |
| | | int.TryParse(tables[12],out CanBind); |
| | | |
| | | int.TryParse(tables[13],out CDTypeEx); |
| | | |
| | | int.TryParse(tables[14],out CDType); |
| | | |
| | | int.TryParse(tables[15],out CDTime); |
| | | |
| | | int.TryParse(tables[16],out GoldPrice); |
| | | |
| | | int.TryParse(tables[17],out GoldPaperPrice); |
| | | |
| | | int.TryParse(tables[18],out SilverPrice); |
| | | |
| | | int.TryParse(tables[19],out UseTag); |
| | | |
| | | int.TryParse(tables[20],out Effect1); |
| | | |
| | | int.TryParse(tables[21],out EffectValueA1); |
| | | |
| | | int.TryParse(tables[22],out EffectValueB1); |
| | | |
| | | int.TryParse(tables[23],out EffectValueC1); |
| | | |
| | | int.TryParse(tables[24],out Effect2); |
| | | |
| | | int.TryParse(tables[25],out EffectValueA2); |
| | | |
| | | int.TryParse(tables[26],out EffectValueB2); |
| | | |
| | | int.TryParse(tables[27],out EffectValueC2); |
| | | |
| | | int.TryParse(tables[28],out Effect3); |
| | | |
| | | int.TryParse(tables[29],out EffectValueA3); |
| | | |
| | | int.TryParse(tables[30],out EffectValueB3); |
| | | |
| | | int.TryParse(tables[31],out EffectValueC3); |
| | | |
| | | int.TryParse(tables[32],out Effect4); |
| | | |
| | | int.TryParse(tables[33],out EffectValueA4); |
| | | |
| | | int.TryParse(tables[34],out EffectValueB4); |
| | | |
| | | int.TryParse(tables[35],out EffectValueC4); |
| | | |
| | | int.TryParse(tables[36],out Effect5); |
| | | |
| | | int.TryParse(tables[37],out EffectValueA5); |
| | | |
| | | int.TryParse(tables[38],out EffectValueB5); |
| | | |
| | | int.TryParse(tables[39],out EffectValueC5); |
| | | |
| | | int.TryParse(tables[40],out AddSkill1); |
| | | |
| | | int.TryParse(tables[41],out AddSkill2); |
| | | |
| | | int.TryParse(tables[42],out JobLimit); |
| | | |
| | | int.TryParse(tables[43],out RealmLimit); |
| | | |
| | | int.TryParse(tables[44],out ItemColor); |
| | | |
| | | int.TryParse(tables[45],out StarLevel); |
| | | |
| | | int.TryParse(tables[46],out MaxHoleCount); |
| | | |
| | | int.TryParse(tables[47],out CanBreak); |
| | | |
| | | int.TryParse(tables[48],out MaxEndure); |
| | | |
| | | int.TryParse(tables[49],out EndureReduceType); |
| | | |
| | | int.TryParse(tables[50],out BindType); |
| | | |
| | | int.TryParse(tables[51],out MaxSkillCnt); |
| | | |
| | | int.TryParse(tables[52],out ExpireTime); |
| | | |
| | | int.TryParse(tables[53],out MaxFitLV); |
| | | |
| | | int.TryParse(tables[54],out SuiteiD); |
| | | |
| | | DropinstantEffName = tables[55]; |
| | | |
| | | IconKey = tables[56]; |
| | | |
| | | int.TryParse(tables[57],out ChangeOrd); |
| | | |
| | | Description = tables[58]; |
| | | |
| | | QualityName = tables[59]; |
| | | |
| | | int.TryParse(tables[60],out QualityEchoType); |
| | | |
| | | int.TryParse(tables[61],out LimitSTR); |
| | | |
| | | int.TryParse(tables[62],out LimitPHY); |
| | | |
| | | int.TryParse(tables[63],out LimitPNE); |
| | | |
| | | Template = tables[64]; |
| | | |
| | | int.TryParse(tables[65],out DropItemPattern); |
| | | |
| | | int.TryParse(tables[66],out SellTip); |
| | | |
| | | int.TryParse(tables[67],out BatchUse); |
| | | |
| | | int.TryParse(tables[68],out Jump); |
| | | |
| | | }
|
| | |
|
| | | int.TryParse(tables[11],out CanDrop); |
| | |
|
| | | int.TryParse(tables[12],out CanBind); |
| | |
|
| | | int.TryParse(tables[13],out CDTypeEx); |
| | |
|
| | | int.TryParse(tables[14],out CDType); |
| | |
|
| | | int.TryParse(tables[15],out CDTime); |
| | |
|
| | | int.TryParse(tables[16],out GoldPrice); |
| | |
|
| | | int.TryParse(tables[17],out GoldPaperPrice); |
| | |
|
| | | int.TryParse(tables[18],out SilverPrice); |
| | |
|
| | | int.TryParse(tables[19],out UseTag); |
| | |
|
| | | int.TryParse(tables[20],out Effect1); |
| | |
|
| | | int.TryParse(tables[21],out EffectValueA1); |
| | |
|
| | | int.TryParse(tables[22],out EffectValueB1); |
| | |
|
| | | int.TryParse(tables[23],out EffectValueC1); |
| | |
|
| | | int.TryParse(tables[24],out Effect2); |
| | |
|
| | | int.TryParse(tables[25],out EffectValueA2); |
| | |
|
| | | int.TryParse(tables[26],out EffectValueB2); |
| | |
|
| | | int.TryParse(tables[27],out EffectValueC2); |
| | |
|
| | | int.TryParse(tables[28],out Effect3); |
| | |
|
| | | int.TryParse(tables[29],out EffectValueA3); |
| | |
|
| | | int.TryParse(tables[30],out EffectValueB3); |
| | |
|
| | | int.TryParse(tables[31],out EffectValueC3); |
| | |
|
| | | int.TryParse(tables[32],out Effect4); |
| | |
|
| | | int.TryParse(tables[33],out EffectValueA4); |
| | |
|
| | | int.TryParse(tables[34],out EffectValueB4); |
| | |
|
| | | int.TryParse(tables[35],out EffectValueC4); |
| | |
|
| | | int.TryParse(tables[36],out Effect5); |
| | |
|
| | | int.TryParse(tables[37],out EffectValueA5); |
| | |
|
| | | int.TryParse(tables[38],out EffectValueB5); |
| | |
|
| | | int.TryParse(tables[39],out EffectValueC5); |
| | |
|
| | | int.TryParse(tables[40],out AddSkill1); |
| | |
|
| | | int.TryParse(tables[41],out AddSkill2); |
| | |
|
| | | int.TryParse(tables[42],out JobLimit); |
| | |
|
| | | int.TryParse(tables[43],out RealmLimit); |
| | |
|
| | | int.TryParse(tables[44],out ItemColor); |
| | |
|
| | | int.TryParse(tables[45],out StarLevel); |
| | |
|
| | | int.TryParse(tables[46],out MaxHoleCount); |
| | |
|
| | | int.TryParse(tables[47],out CanBreak); |
| | |
|
| | | int.TryParse(tables[48],out MaxEndure); |
| | |
|
| | | int.TryParse(tables[49],out EndureReduceType); |
| | |
|
| | | int.TryParse(tables[50],out BindType); |
| | |
|
| | | int.TryParse(tables[51],out MaxSkillCnt); |
| | |
|
| | | int.TryParse(tables[52],out ExpireTime); |
| | |
|
| | | int.TryParse(tables[53],out MaxFitLV); |
| | |
|
| | | int.TryParse(tables[54],out SuiteiD); |
| | |
|
| | | DropinstantEffName = tables[55];
|
| | |
|
| | | IconKey = tables[56];
|
| | |
|
| | | int.TryParse(tables[57],out ChangeOrd); |
| | |
|
| | | Description = tables[58];
|
| | |
|
| | | QualityName = tables[59];
|
| | |
|
| | | int.TryParse(tables[60],out QualityEchoType); |
| | |
|
| | | int.TryParse(tables[61],out LimitSTR); |
| | |
|
| | | int.TryParse(tables[62],out LimitPHY); |
| | |
|
| | | int.TryParse(tables[63],out LimitPNE); |
| | |
|
| | | Template = tables[64];
|
| | |
|
| | | int.TryParse(tables[65],out DropItemPattern); |
| | |
|
| | | int.TryParse(tables[66],out SellTip); |
| | |
|
| | | int.TryParse(tables[67],out BatchUse); |
| | |
|
| | | int.TryParse(tables[68],out Jump); |
| | |
|
| | | if (tables[69].Contains("[")) |
| | | { |
| | | GetWay = JsonMapper.ToObject<int[]>(tables[69]); |
| | |
| | | { |
| | | int.TryParse(GetWayStringArray[i],out GetWay[i]); |
| | | } |
| | | } |
| | | |
| | | ItemTypeName = tables[70]; |
| | | |
| | | }
|
| | |
|
| | | ItemTypeName = tables[70];
|
| | |
|
| | | if (tables[71].Contains("[")) |
| | | { |
| | | UseCondiType = JsonMapper.ToObject<int[]>(tables[71]); |
| | |
| | | { |
| | | int.TryParse(UseCondiTypeStringArray[i],out UseCondiType[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[72],out BaseEffectID); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[72],out BaseEffectID); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 KickOutReasonConfig : ConfigBase<int, KickOutReasonConfig> |
| | | { |
| | | |
| | | public int id; |
| | | public string kickout; |
| | | |
| | | 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); |
| | | |
| | | kickout = tables[1]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class KickOutReasonConfig : ConfigBase<int, KickOutReasonConfig>
|
| | | {
|
| | |
|
| | | public int id;
|
| | | public string kickout;
|
| | |
|
| | | 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); |
| | |
|
| | | kickout = tables[1];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 LanguageConfig : ConfigBase<string, LanguageConfig> |
| | | { |
| | | |
| | | public string id; |
| | | public string content; |
| | | |
| | | public override string LoadKey(string _key) |
| | | { |
| | | string key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | id = tables[0]; |
| | | |
| | | content = tables[1]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class LanguageConfig : ConfigBase<string, LanguageConfig>
|
| | | {
|
| | |
|
| | | public string id;
|
| | | public string content;
|
| | |
|
| | | public override string LoadKey(string _key)
|
| | | {
|
| | | string key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | id = tables[0];
|
| | |
|
| | | content = tables[1];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 MailConfig : ConfigBase<string, MailConfig> |
| | | { |
| | | |
| | | public string MailType; |
| | | public string Title; |
| | | public string Content; |
| | | |
| | | public override string LoadKey(string _key) |
| | | { |
| | | string key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | MailType = tables[0]; |
| | | |
| | | Title = tables[1]; |
| | | |
| | | Content = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class MailConfig : ConfigBase<string, MailConfig>
|
| | | {
|
| | |
|
| | | public string MailType;
|
| | | public string Title;
|
| | | public string Content;
|
| | |
|
| | | public override string LoadKey(string _key)
|
| | | {
|
| | | string key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | MailType = tables[0];
|
| | |
|
| | | Title = tables[1];
|
| | |
|
| | | Content = tables[2];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月7日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class MainChapterConfig : ConfigBase<int, MainChapterConfig> |
| | | { |
| | | |
| | | public int ChapterID; |
| | | public string ChapterName; |
| | | public string Level; |
| | | public string MapBG; |
| | | public int[][] DailyBootyUpperList; |
| | | public string BootyWeightList; |
| | | |
| | | 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 ChapterID); |
| | | |
| | | ChapterName = tables[1]; |
| | | |
| | | Level = tables[2]; |
| | | |
| | | MapBG = tables[3]; |
| | | |
| | | DailyBootyUpperList = JsonMapper.ToObject<int[][]>(tables[4].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | BootyWeightList = tables[5]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class MainChapterConfig : ConfigBase<int, MainChapterConfig>
|
| | | {
|
| | |
|
| | | public int ChapterID;
|
| | | public string ChapterName;
|
| | | public string Level;
|
| | | public string MapBG;
|
| | | public int[][] DailyBootyUpperList;
|
| | | public string BootyWeightList;
|
| | |
|
| | | 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 ChapterID); |
| | |
|
| | | ChapterName = tables[1];
|
| | |
|
| | | Level = tables[2];
|
| | |
|
| | | MapBG = tables[3];
|
| | |
|
| | | DailyBootyUpperList = JsonMapper.ToObject<int[][]>(tables[4].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | BootyWeightList = tables[5];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月7日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class MainLevelConfig : ConfigBase<int, MainLevelConfig> |
| | | { |
| | | |
| | | public int LevelID; |
| | | public int ChapterID; |
| | | public int LevelNum; |
| | | public int[] WaveLineupIDList1; |
| | | public int[] WaveLineupIDList2; |
| | | public int[] WaveLineupIDList3; |
| | | public int[] WaveLineupIDList4; |
| | | public int[] WaveLineupIDList5; |
| | | public int[] WaveLineupIDList6; |
| | | public int[] BossLineupIDList; |
| | | public int[][] AwardItemList; |
| | | |
| | | 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 LevelID); |
| | | |
| | | int.TryParse(tables[1],out ChapterID); |
| | | |
| | | int.TryParse(tables[2],out LevelNum); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class MainLevelConfig : ConfigBase<int, MainLevelConfig>
|
| | | {
|
| | |
|
| | | public int LevelID;
|
| | | public int ChapterID;
|
| | | public int LevelNum;
|
| | | public int[] WaveLineupIDList1;
|
| | | public int[] WaveLineupIDList2;
|
| | | public int[] WaveLineupIDList3;
|
| | | public int[] WaveLineupIDList4;
|
| | | public int[] WaveLineupIDList5;
|
| | | public int[] WaveLineupIDList6;
|
| | | public int[] BossLineupIDList;
|
| | | public int[][] AwardItemList;
|
| | |
|
| | | 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 LevelID); |
| | |
|
| | | int.TryParse(tables[1],out ChapterID); |
| | |
|
| | | int.TryParse(tables[2],out LevelNum); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | WaveLineupIDList1 = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList1StringArray[i],out WaveLineupIDList1[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | WaveLineupIDList2 = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList2StringArray[i],out WaveLineupIDList2[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[5].Contains("[")) |
| | | { |
| | | WaveLineupIDList3 = JsonMapper.ToObject<int[]>(tables[5]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList3StringArray[i],out WaveLineupIDList3[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[6].Contains("[")) |
| | | { |
| | | WaveLineupIDList4 = JsonMapper.ToObject<int[]>(tables[6]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList4StringArray[i],out WaveLineupIDList4[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[7].Contains("[")) |
| | | { |
| | | WaveLineupIDList5 = JsonMapper.ToObject<int[]>(tables[7]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList5StringArray[i],out WaveLineupIDList5[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[8].Contains("[")) |
| | | { |
| | | WaveLineupIDList6 = JsonMapper.ToObject<int[]>(tables[8]); |
| | |
| | | { |
| | | int.TryParse(WaveLineupIDList6StringArray[i],out WaveLineupIDList6[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[9].Contains("[")) |
| | | { |
| | | BossLineupIDList = JsonMapper.ToObject<int[]>(tables[9]); |
| | |
| | | { |
| | | int.TryParse(BossLineupIDListStringArray[i],out BossLineupIDList[i]); |
| | | } |
| | | } |
| | | |
| | | AwardItemList = JsonMapper.ToObject<int[][]>(tables[10].Replace("(", "[").Replace(")", "]")); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | AwardItemList = JsonMapper.ToObject<int[][]>(tables[10].Replace("(", "[").Replace(")", "]")); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 NPCConfig : ConfigBase<int, NPCConfig> |
| | | { |
| | | |
| | | public int NPCID; |
| | | public int NPCType; |
| | | public string MODE; |
| | | public string charName; |
| | | public int NPCLV; |
| | | public float ModleHeight; |
| | | public float ModelRadius; |
| | | public float ModeProportion; |
| | | public Vector3 UIModeLOffset; |
| | | public float UIModeLProportion; |
| | | public Vector3 UIModelRotation; |
| | | public int CanDeadFly; |
| | | public int Country; |
| | | public int MinAtk; |
| | | public int MaxAtk; |
| | | public int Def; |
| | | public int Realm; |
| | | public int PoisionAtk; |
| | | public int FireAtk; |
| | | public int IceAtk; |
| | | public int PoisionDef; |
| | | public int IceDef; |
| | | public int ThunderDef; |
| | | public int AtkInterval; |
| | | public int Hit; |
| | | public int MissRate; |
| | | public int SuperHiteRate; |
| | | public int OrgSpeed; |
| | | public int MoveType; |
| | | public int AtkDist; |
| | | public int Skill1; |
| | | public int Skill2; |
| | | public int Skill3; |
| | | public int Skill4; |
| | | public int Skill5; |
| | | public int Skill6; |
| | | public int Skill7; |
| | | public int Skill8; |
| | | public int AtkType; |
| | | public int Sight; |
| | | public int MoveArea; |
| | | public int DHP; |
| | | public int MaxHPEx; |
| | | public int IsBoss; |
| | | public int SP; |
| | | public int AIType; |
| | | public int CanAttack; |
| | | public float weight; |
| | | public string HeadPortrait; |
| | | public int Show; |
| | | public int AtkFeedback; |
| | | public int hurtFeedback; |
| | | public int AutomaticFace; |
| | | public int Dig; |
| | | public int[] Sounds; |
| | | public int LifeBarCount; |
| | | public int NPCEffect; |
| | | public int NPCSpeakID; |
| | | public string Equips; |
| | | |
| | | 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 NPCID); |
| | | |
| | | int.TryParse(tables[1],out NPCType); |
| | | |
| | | MODE = tables[2]; |
| | | |
| | | charName = tables[3]; |
| | | |
| | | int.TryParse(tables[4],out NPCLV); |
| | | |
| | | float.TryParse(tables[5],out ModleHeight); |
| | | |
| | | float.TryParse(tables[6],out ModelRadius); |
| | | |
| | | float.TryParse(tables[7],out ModeProportion); |
| | | |
| | | UIModeLOffset=tables[8].Vector3Parse(); |
| | | |
| | | float.TryParse(tables[9],out UIModeLProportion); |
| | | |
| | | UIModelRotation=tables[10].Vector3Parse(); |
| | | |
| | | int.TryParse(tables[11],out CanDeadFly); |
| | | |
| | | int.TryParse(tables[12],out Country); |
| | | |
| | | int.TryParse(tables[13],out MinAtk); |
| | | |
| | | int.TryParse(tables[14],out MaxAtk); |
| | | |
| | | int.TryParse(tables[15],out Def); |
| | | |
| | | int.TryParse(tables[16],out Realm); |
| | | |
| | | int.TryParse(tables[17],out PoisionAtk); |
| | | |
| | | int.TryParse(tables[18],out FireAtk); |
| | | |
| | | int.TryParse(tables[19],out IceAtk); |
| | | |
| | | int.TryParse(tables[20],out PoisionDef); |
| | | |
| | | int.TryParse(tables[21],out IceDef); |
| | | |
| | | int.TryParse(tables[22],out ThunderDef); |
| | | |
| | | int.TryParse(tables[23],out AtkInterval); |
| | | |
| | | int.TryParse(tables[24],out Hit); |
| | | |
| | | int.TryParse(tables[25],out MissRate); |
| | | |
| | | int.TryParse(tables[26],out SuperHiteRate); |
| | | |
| | | int.TryParse(tables[27],out OrgSpeed); |
| | | |
| | | int.TryParse(tables[28],out MoveType); |
| | | |
| | | int.TryParse(tables[29],out AtkDist); |
| | | |
| | | int.TryParse(tables[30],out Skill1); |
| | | |
| | | int.TryParse(tables[31],out Skill2); |
| | | |
| | | int.TryParse(tables[32],out Skill3); |
| | | |
| | | int.TryParse(tables[33],out Skill4); |
| | | |
| | | int.TryParse(tables[34],out Skill5); |
| | | |
| | | int.TryParse(tables[35],out Skill6); |
| | | |
| | | int.TryParse(tables[36],out Skill7); |
| | | |
| | | int.TryParse(tables[37],out Skill8); |
| | | |
| | | int.TryParse(tables[38],out AtkType); |
| | | |
| | | int.TryParse(tables[39],out Sight); |
| | | |
| | | int.TryParse(tables[40],out MoveArea); |
| | | |
| | | int.TryParse(tables[41],out DHP); |
| | | |
| | | int.TryParse(tables[42],out MaxHPEx); |
| | | |
| | | int.TryParse(tables[43],out IsBoss); |
| | | |
| | | int.TryParse(tables[44],out SP); |
| | | |
| | | int.TryParse(tables[45],out AIType); |
| | | |
| | | int.TryParse(tables[46],out CanAttack); |
| | | |
| | | float.TryParse(tables[47],out weight); |
| | | |
| | | HeadPortrait = tables[48]; |
| | | |
| | | int.TryParse(tables[49],out Show); |
| | | |
| | | int.TryParse(tables[50],out AtkFeedback); |
| | | |
| | | int.TryParse(tables[51],out hurtFeedback); |
| | | |
| | | int.TryParse(tables[52],out AutomaticFace); |
| | | |
| | | int.TryParse(tables[53],out Dig); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class NPCConfig : ConfigBase<int, NPCConfig>
|
| | | {
|
| | |
|
| | | public int NPCID;
|
| | | public int NPCType;
|
| | | public string MODE;
|
| | | public string charName;
|
| | | public int NPCLV;
|
| | | public float ModleHeight;
|
| | | public float ModelRadius;
|
| | | public float ModeProportion;
|
| | | public Vector3 UIModeLOffset;
|
| | | public float UIModeLProportion;
|
| | | public Vector3 UIModelRotation;
|
| | | public int CanDeadFly;
|
| | | public int Country;
|
| | | public int MinAtk;
|
| | | public int MaxAtk;
|
| | | public int Def;
|
| | | public int Realm;
|
| | | public int PoisionAtk;
|
| | | public int FireAtk;
|
| | | public int IceAtk;
|
| | | public int PoisionDef;
|
| | | public int IceDef;
|
| | | public int ThunderDef;
|
| | | public int AtkInterval;
|
| | | public int Hit;
|
| | | public int MissRate;
|
| | | public int SuperHiteRate;
|
| | | public int OrgSpeed;
|
| | | public int MoveType;
|
| | | public int AtkDist;
|
| | | public int Skill1;
|
| | | public int Skill2;
|
| | | public int Skill3;
|
| | | public int Skill4;
|
| | | public int Skill5;
|
| | | public int Skill6;
|
| | | public int Skill7;
|
| | | public int Skill8;
|
| | | public int AtkType;
|
| | | public int Sight;
|
| | | public int MoveArea;
|
| | | public int DHP;
|
| | | public int MaxHPEx;
|
| | | public int IsBoss;
|
| | | public int SP;
|
| | | public int AIType;
|
| | | public int CanAttack;
|
| | | public float weight;
|
| | | public string HeadPortrait;
|
| | | public int Show;
|
| | | public int AtkFeedback;
|
| | | public int hurtFeedback;
|
| | | public int AutomaticFace;
|
| | | public int Dig;
|
| | | public int[] Sounds;
|
| | | public int LifeBarCount;
|
| | | public int NPCEffect;
|
| | | public int NPCSpeakID;
|
| | | public string Equips;
|
| | |
|
| | | 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 NPCID); |
| | |
|
| | | int.TryParse(tables[1],out NPCType); |
| | |
|
| | | MODE = tables[2];
|
| | |
|
| | | charName = tables[3];
|
| | |
|
| | | int.TryParse(tables[4],out NPCLV); |
| | |
|
| | | float.TryParse(tables[5],out ModleHeight); |
| | |
|
| | | float.TryParse(tables[6],out ModelRadius); |
| | |
|
| | | float.TryParse(tables[7],out ModeProportion); |
| | |
|
| | | UIModeLOffset=tables[8].Vector3Parse();
|
| | |
|
| | | float.TryParse(tables[9],out UIModeLProportion); |
| | |
|
| | | UIModelRotation=tables[10].Vector3Parse();
|
| | |
|
| | | int.TryParse(tables[11],out CanDeadFly); |
| | |
|
| | | int.TryParse(tables[12],out Country); |
| | |
|
| | | int.TryParse(tables[13],out MinAtk); |
| | |
|
| | | int.TryParse(tables[14],out MaxAtk); |
| | |
|
| | | int.TryParse(tables[15],out Def); |
| | |
|
| | | int.TryParse(tables[16],out Realm); |
| | |
|
| | | int.TryParse(tables[17],out PoisionAtk); |
| | |
|
| | | int.TryParse(tables[18],out FireAtk); |
| | |
|
| | | int.TryParse(tables[19],out IceAtk); |
| | |
|
| | | int.TryParse(tables[20],out PoisionDef); |
| | |
|
| | | int.TryParse(tables[21],out IceDef); |
| | |
|
| | | int.TryParse(tables[22],out ThunderDef); |
| | |
|
| | | int.TryParse(tables[23],out AtkInterval); |
| | |
|
| | | int.TryParse(tables[24],out Hit); |
| | |
|
| | | int.TryParse(tables[25],out MissRate); |
| | |
|
| | | int.TryParse(tables[26],out SuperHiteRate); |
| | |
|
| | | int.TryParse(tables[27],out OrgSpeed); |
| | |
|
| | | int.TryParse(tables[28],out MoveType); |
| | |
|
| | | int.TryParse(tables[29],out AtkDist); |
| | |
|
| | | int.TryParse(tables[30],out Skill1); |
| | |
|
| | | int.TryParse(tables[31],out Skill2); |
| | |
|
| | | int.TryParse(tables[32],out Skill3); |
| | |
|
| | | int.TryParse(tables[33],out Skill4); |
| | |
|
| | | int.TryParse(tables[34],out Skill5); |
| | |
|
| | | int.TryParse(tables[35],out Skill6); |
| | |
|
| | | int.TryParse(tables[36],out Skill7); |
| | |
|
| | | int.TryParse(tables[37],out Skill8); |
| | |
|
| | | int.TryParse(tables[38],out AtkType); |
| | |
|
| | | int.TryParse(tables[39],out Sight); |
| | |
|
| | | int.TryParse(tables[40],out MoveArea); |
| | |
|
| | | int.TryParse(tables[41],out DHP); |
| | |
|
| | | int.TryParse(tables[42],out MaxHPEx); |
| | |
|
| | | int.TryParse(tables[43],out IsBoss); |
| | |
|
| | | int.TryParse(tables[44],out SP); |
| | |
|
| | | int.TryParse(tables[45],out AIType); |
| | |
|
| | | int.TryParse(tables[46],out CanAttack); |
| | |
|
| | | float.TryParse(tables[47],out weight); |
| | |
|
| | | HeadPortrait = tables[48];
|
| | |
|
| | | int.TryParse(tables[49],out Show); |
| | |
|
| | | int.TryParse(tables[50],out AtkFeedback); |
| | |
|
| | | int.TryParse(tables[51],out hurtFeedback); |
| | |
|
| | | int.TryParse(tables[52],out AutomaticFace); |
| | |
|
| | | int.TryParse(tables[53],out Dig); |
| | |
|
| | | if (tables[54].Contains("[")) |
| | | { |
| | | Sounds = JsonMapper.ToObject<int[]>(tables[54]); |
| | |
| | | { |
| | | int.TryParse(SoundsStringArray[i],out Sounds[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[55],out LifeBarCount); |
| | | |
| | | int.TryParse(tables[56],out NPCEffect); |
| | | |
| | | int.TryParse(tables[57],out NPCSpeakID); |
| | | |
| | | Equips = tables[58]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[55],out LifeBarCount); |
| | |
|
| | | int.TryParse(tables[56],out NPCEffect); |
| | |
|
| | | int.TryParse(tables[57],out NPCSpeakID); |
| | |
|
| | | Equips = tables[58];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 NPCExConfig : ConfigBase<int, NPCExConfig> |
| | | { |
| | | |
| | | public int NPCID; |
| | | public long SuppressFightPower; |
| | | |
| | | 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 NPCID); |
| | | |
| | | long.TryParse(tables[1],out SuppressFightPower); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class NPCExConfig : ConfigBase<int, NPCExConfig>
|
| | | {
|
| | |
|
| | | public int NPCID;
|
| | | public long SuppressFightPower;
|
| | |
|
| | | 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 NPCID); |
| | |
|
| | | long.TryParse(tables[1],out SuppressFightPower); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月7日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class NPCLineupConfig : ConfigBase<int, NPCLineupConfig> |
| | | { |
| | | |
| | | public int LineupID; |
| | | public int PosNPCID1; |
| | | public int PosNPCID2; |
| | | public int PosNPCID3; |
| | | public int PosNPCID4; |
| | | public int PosNPCID5; |
| | | public int PosNPCID6; |
| | | public int PosNPCID7; |
| | | public int BossID; |
| | | |
| | | 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 LineupID); |
| | | |
| | | int.TryParse(tables[1],out PosNPCID1); |
| | | |
| | | int.TryParse(tables[2],out PosNPCID2); |
| | | |
| | | int.TryParse(tables[3],out PosNPCID3); |
| | | |
| | | int.TryParse(tables[4],out PosNPCID4); |
| | | |
| | | int.TryParse(tables[5],out PosNPCID5); |
| | | |
| | | int.TryParse(tables[6],out PosNPCID6); |
| | | |
| | | int.TryParse(tables[7],out PosNPCID7); |
| | | |
| | | int.TryParse(tables[8],out BossID); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class NPCLineupConfig : ConfigBase<int, NPCLineupConfig>
|
| | | {
|
| | |
|
| | | public int LineupID;
|
| | | public int PosNPCID1;
|
| | | public int PosNPCID2;
|
| | | public int PosNPCID3;
|
| | | public int PosNPCID4;
|
| | | public int PosNPCID5;
|
| | | public int PosNPCID6;
|
| | | public int PosNPCID7;
|
| | | public int BossID;
|
| | |
|
| | | 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 LineupID); |
| | |
|
| | | int.TryParse(tables[1],out PosNPCID1); |
| | |
|
| | | int.TryParse(tables[2],out PosNPCID2); |
| | |
|
| | | int.TryParse(tables[3],out PosNPCID3); |
| | |
|
| | | int.TryParse(tables[4],out PosNPCID4); |
| | |
|
| | | int.TryParse(tables[5],out PosNPCID5); |
| | |
|
| | | int.TryParse(tables[6],out PosNPCID6); |
| | |
|
| | | int.TryParse(tables[7],out PosNPCID7); |
| | |
|
| | | int.TryParse(tables[8],out BossID); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 OrderInfoConfig : ConfigBase<int, OrderInfoConfig> |
| | | { |
| | | |
| | | public int id; |
| | | public string OrderInfo; |
| | | public string AppId; |
| | | public float PayRMBNum; |
| | | public int CTGID; |
| | | public float UsdMoney; |
| | | public string StoreOrderInfo; |
| | | public string StoreOrderInfo2; |
| | | public string Name; |
| | | public string StoreOrderInfo3; |
| | | |
| | | 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); |
| | | |
| | | OrderInfo = tables[1]; |
| | | |
| | | AppId = tables[2]; |
| | | |
| | | float.TryParse(tables[3],out PayRMBNum); |
| | | |
| | | int.TryParse(tables[4],out CTGID); |
| | | |
| | | float.TryParse(tables[5],out UsdMoney); |
| | | |
| | | StoreOrderInfo = tables[6]; |
| | | |
| | | StoreOrderInfo2 = tables[7]; |
| | | |
| | | Name = tables[8]; |
| | | |
| | | StoreOrderInfo3 = tables[9]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class OrderInfoConfig : ConfigBase<int, OrderInfoConfig>
|
| | | {
|
| | |
|
| | | public int id;
|
| | | public string OrderInfo;
|
| | | public string AppId;
|
| | | public float PayRMBNum;
|
| | | public int CTGID;
|
| | | public float UsdMoney;
|
| | | public string StoreOrderInfo;
|
| | | public string StoreOrderInfo2;
|
| | | public string Name;
|
| | | public string StoreOrderInfo3;
|
| | |
|
| | | 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); |
| | |
|
| | | OrderInfo = tables[1];
|
| | |
|
| | | AppId = tables[2];
|
| | |
|
| | | float.TryParse(tables[3],out PayRMBNum); |
| | |
|
| | | int.TryParse(tables[4],out CTGID); |
| | |
|
| | | float.TryParse(tables[5],out UsdMoney); |
| | |
|
| | | StoreOrderInfo = tables[6];
|
| | |
|
| | | StoreOrderInfo2 = tables[7];
|
| | |
|
| | | Name = tables[8];
|
| | |
|
| | | StoreOrderInfo3 = tables[9];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 PlayerFaceConfig : ConfigBase<int, PlayerFaceConfig> |
| | | { |
| | | |
| | | public int FaceID; |
| | | public string Name; |
| | | public int[] JobShowList; |
| | | public int UnlockDefault; |
| | | public int ExpireMinutes; |
| | | public int CustomPlayerID; |
| | | public string Image; |
| | | public int BgColor; |
| | | public int EffectID; |
| | | public int[][] UnlockNeedItemList; |
| | | public int[] LightAttrType; |
| | | public int[] LightAttrValue; |
| | | public int LightFightPower; |
| | | public string Descriptive; |
| | | |
| | | 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 FaceID); |
| | | |
| | | Name = tables[1]; |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class PlayerFaceConfig : ConfigBase<int, PlayerFaceConfig>
|
| | | {
|
| | |
|
| | | public int FaceID;
|
| | | public string Name;
|
| | | public int[] JobShowList;
|
| | | public int UnlockDefault;
|
| | | public int ExpireMinutes;
|
| | | public int CustomPlayerID;
|
| | | public string Image;
|
| | | public int BgColor;
|
| | | public int EffectID;
|
| | | public int[][] UnlockNeedItemList;
|
| | | public int[] LightAttrType;
|
| | | public int[] LightAttrValue;
|
| | | public int LightFightPower;
|
| | | public string Descriptive;
|
| | |
|
| | | 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 FaceID); |
| | |
|
| | | Name = tables[1];
|
| | |
|
| | | if (tables[2].Contains("[")) |
| | | { |
| | | JobShowList = JsonMapper.ToObject<int[]>(tables[2]); |
| | |
| | | { |
| | | int.TryParse(JobShowListStringArray[i],out JobShowList[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[3],out UnlockDefault); |
| | | |
| | | int.TryParse(tables[4],out ExpireMinutes); |
| | | |
| | | int.TryParse(tables[5],out CustomPlayerID); |
| | | |
| | | Image = tables[6]; |
| | | |
| | | int.TryParse(tables[7],out BgColor); |
| | | |
| | | int.TryParse(tables[8],out EffectID); |
| | | |
| | | UnlockNeedItemList = JsonMapper.ToObject<int[][]>(tables[9].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | }
|
| | |
|
| | | int.TryParse(tables[3],out UnlockDefault); |
| | |
|
| | | int.TryParse(tables[4],out ExpireMinutes); |
| | |
|
| | | int.TryParse(tables[5],out CustomPlayerID); |
| | |
|
| | | Image = tables[6];
|
| | |
|
| | | int.TryParse(tables[7],out BgColor); |
| | |
|
| | | int.TryParse(tables[8],out EffectID); |
| | |
|
| | | UnlockNeedItemList = JsonMapper.ToObject<int[][]>(tables[9].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | if (tables[10].Contains("[")) |
| | | { |
| | | LightAttrType = JsonMapper.ToObject<int[]>(tables[10]); |
| | |
| | | { |
| | | int.TryParse(LightAttrTypeStringArray[i],out LightAttrType[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[11].Contains("[")) |
| | | { |
| | | LightAttrValue = JsonMapper.ToObject<int[]>(tables[11]); |
| | |
| | | { |
| | | int.TryParse(LightAttrValueStringArray[i],out LightAttrValue[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[12],out LightFightPower); |
| | | |
| | | Descriptive = tables[13]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[12],out LightFightPower); |
| | |
|
| | | Descriptive = tables[13];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 PlayerFacePicConfig : ConfigBase<int, PlayerFacePicConfig> |
| | | { |
| | | |
| | | public int FacePicID; |
| | | public string Name; |
| | | public string Image; |
| | | public int SortNum; |
| | | public int EffectID; |
| | | public int UnlockDefault; |
| | | public int ExpireMinutes; |
| | | public int[][] UnlockNeedItemList; |
| | | public int[] LightAttrType; |
| | | public int[] LightAttrValue; |
| | | public int LightFightPower; |
| | | public string Descriptive; |
| | | |
| | | 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 FacePicID); |
| | | |
| | | Name = tables[1]; |
| | | |
| | | Image = tables[2]; |
| | | |
| | | int.TryParse(tables[3],out SortNum); |
| | | |
| | | int.TryParse(tables[4],out EffectID); |
| | | |
| | | int.TryParse(tables[5],out UnlockDefault); |
| | | |
| | | int.TryParse(tables[6],out ExpireMinutes); |
| | | |
| | | UnlockNeedItemList = JsonMapper.ToObject<int[][]>(tables[7].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class PlayerFacePicConfig : ConfigBase<int, PlayerFacePicConfig>
|
| | | {
|
| | |
|
| | | public int FacePicID;
|
| | | public string Name;
|
| | | public string Image;
|
| | | public int SortNum;
|
| | | public int EffectID;
|
| | | public int UnlockDefault;
|
| | | public int ExpireMinutes;
|
| | | public int[][] UnlockNeedItemList;
|
| | | public int[] LightAttrType;
|
| | | public int[] LightAttrValue;
|
| | | public int LightFightPower;
|
| | | public string Descriptive;
|
| | |
|
| | | 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 FacePicID); |
| | |
|
| | | Name = tables[1];
|
| | |
|
| | | Image = tables[2];
|
| | |
|
| | | int.TryParse(tables[3],out SortNum); |
| | |
|
| | | int.TryParse(tables[4],out EffectID); |
| | |
|
| | | int.TryParse(tables[5],out UnlockDefault); |
| | |
|
| | | int.TryParse(tables[6],out ExpireMinutes); |
| | |
|
| | | UnlockNeedItemList = JsonMapper.ToObject<int[][]>(tables[7].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | if (tables[8].Contains("[")) |
| | | { |
| | | LightAttrType = JsonMapper.ToObject<int[]>(tables[8]); |
| | |
| | | { |
| | | int.TryParse(LightAttrTypeStringArray[i],out LightAttrType[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[9].Contains("[")) |
| | | { |
| | | LightAttrValue = JsonMapper.ToObject<int[]>(tables[9]); |
| | |
| | | { |
| | | int.TryParse(LightAttrValueStringArray[i],out LightAttrValue[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[10],out LightFightPower); |
| | | |
| | | Descriptive = tables[11]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[10],out LightFightPower); |
| | |
|
| | | Descriptive = tables[11];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 PlayerFacePicStarConfig : ConfigBase<int, PlayerFacePicStarConfig> |
| | | { |
| | | |
| | | public int index; |
| | | public int FacePicID; |
| | | public int FacePicStar; |
| | | public int[][] StarUpNeedItemList; |
| | | public int[] StarAttrType; |
| | | public int[] StarAttrValue; |
| | | |
| | | 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 index); |
| | | |
| | | int.TryParse(tables[1],out FacePicID); |
| | | |
| | | int.TryParse(tables[2],out FacePicStar); |
| | | |
| | | StarUpNeedItemList = JsonMapper.ToObject<int[][]>(tables[3].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class PlayerFacePicStarConfig : ConfigBase<int, PlayerFacePicStarConfig>
|
| | | {
|
| | |
|
| | | public int index;
|
| | | public int FacePicID;
|
| | | public int FacePicStar;
|
| | | public int[][] StarUpNeedItemList;
|
| | | public int[] StarAttrType;
|
| | | public int[] StarAttrValue;
|
| | |
|
| | | 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 index); |
| | |
|
| | | int.TryParse(tables[1],out FacePicID); |
| | |
|
| | | int.TryParse(tables[2],out FacePicStar); |
| | |
|
| | | StarUpNeedItemList = JsonMapper.ToObject<int[][]>(tables[3].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | StarAttrType = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(StarAttrTypeStringArray[i],out StarAttrType[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[5].Contains("[")) |
| | | { |
| | | StarAttrValue = JsonMapper.ToObject<int[]>(tables[5]); |
| | |
| | | { |
| | | int.TryParse(StarAttrValueStringArray[i],out StarAttrValue[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 PlayerFaceStarConfig : ConfigBase<int, PlayerFaceStarConfig> |
| | | { |
| | | |
| | | public int index; |
| | | public int FaceID; |
| | | public int FaceStar; |
| | | public int[][] StarUpNeedItemList; |
| | | public int[] StarAttrType; |
| | | public int[] StarAttrValue; |
| | | |
| | | 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 index); |
| | | |
| | | int.TryParse(tables[1],out FaceID); |
| | | |
| | | int.TryParse(tables[2],out FaceStar); |
| | | |
| | | StarUpNeedItemList = JsonMapper.ToObject<int[][]>(tables[3].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class PlayerFaceStarConfig : ConfigBase<int, PlayerFaceStarConfig>
|
| | | {
|
| | |
|
| | | public int index;
|
| | | public int FaceID;
|
| | | public int FaceStar;
|
| | | public int[][] StarUpNeedItemList;
|
| | | public int[] StarAttrType;
|
| | | public int[] StarAttrValue;
|
| | |
|
| | | 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 index); |
| | |
|
| | | int.TryParse(tables[1],out FaceID); |
| | |
|
| | | int.TryParse(tables[2],out FaceStar); |
| | |
|
| | | StarUpNeedItemList = JsonMapper.ToObject<int[][]>(tables[3].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | StarAttrType = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(StarAttrTypeStringArray[i],out StarAttrType[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[5].Contains("[")) |
| | | { |
| | | StarAttrValue = JsonMapper.ToObject<int[]>(tables[5]); |
| | |
| | | { |
| | | int.TryParse(StarAttrValueStringArray[i],out StarAttrValue[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 PriorLanguageConfig : ConfigBase<int, PriorLanguageConfig> |
| | | { |
| | | |
| | | public int Key; |
| | | public string Content; |
| | | |
| | | 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 Key); |
| | | |
| | | Content = tables[1]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class PriorLanguageConfig : ConfigBase<int, PriorLanguageConfig>
|
| | | {
|
| | |
|
| | | public int Key;
|
| | | public string Content;
|
| | |
|
| | | 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 Key); |
| | |
|
| | | Content = tables[1];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 RichTextMsgReplaceConfig : ConfigBase<int, RichTextMsgReplaceConfig> |
| | | { |
| | | |
| | | public int id; |
| | | public string Identification; |
| | | public int Number; |
| | | public string Content; |
| | | |
| | | 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); |
| | | |
| | | Identification = tables[1]; |
| | | |
| | | int.TryParse(tables[2],out Number); |
| | | |
| | | Content = tables[3]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class RichTextMsgReplaceConfig : ConfigBase<int, RichTextMsgReplaceConfig>
|
| | | {
|
| | |
|
| | | public int id;
|
| | | public string Identification;
|
| | | public int Number;
|
| | | public string Content;
|
| | |
|
| | | 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); |
| | |
|
| | | Identification = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out Number); |
| | |
|
| | | Content = tables[3];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 RuleConfig : ConfigBase<int, RuleConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public string Title; |
| | | public string Description; |
| | | |
| | | 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); |
| | | |
| | | Title = tables[1]; |
| | | |
| | | Description = tables[2]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class RuleConfig : ConfigBase<int, RuleConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public string Title;
|
| | | public string Description;
|
| | |
|
| | | 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); |
| | |
|
| | | Title = tables[1];
|
| | |
|
| | | Description = tables[2];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月17日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class SkillConfig : ConfigBase<int, SkillConfig> |
| | | { |
| | | |
| | | public int SkillID; |
| | | public string SkillName; |
| | | public int SkillTypeID; |
| | | public int SkillLV; |
| | | public int SkillMaxLV; |
| | | public int UseType; |
| | | public int FuncType; |
| | | public int CastTime; |
| | | public int SkillType; |
| | | public int HurtType; |
| | | public int ContinueUse; |
| | | public int AtkType; |
| | | public int AtkRadius; |
| | | public int Tag; |
| | | public int AtkDist; |
| | | public int StiffTime; |
| | | public int CoolDownTime; |
| | | public int MP; |
| | | public int HP; |
| | | public int XP; |
| | | public int UseItemID; |
| | | public int UseItemCount; |
| | | public int Effect1; |
| | | public int EffectValue11; |
| | | public int EffectValue12; |
| | | public int EffectValue13; |
| | | public int Effect2; |
| | | public int EffectValue21; |
| | | public int EffectValue22; |
| | | public int EffectValue23; |
| | | public int Effect3; |
| | | public int EffectValue31; |
| | | public int EffectValue32; |
| | | public int EffectValue33; |
| | | public int Effect4; |
| | | public int EffectValue41; |
| | | public int EffectValue42; |
| | | public int EffectValue43; |
| | | public int Effect5; |
| | | public int EffectValue51; |
| | | public int EffectValue52; |
| | | public int EffectValue53; |
| | | public int Effect6; |
| | | public int EffectValue61; |
| | | public int EffectValue62; |
| | | public int EffectValue63; |
| | | public int HappenRate6; |
| | | public int LastTime6; |
| | | public int SkillEnhance1; |
| | | public int SkillEnhance2; |
| | | public int StateSkillLV; |
| | | public int LearnSkillReq; |
| | | public int LearnSkillLV; |
| | | public int LearnLVReq; |
| | | public int LearnSkillPointReq; |
| | | public int FightPower; |
| | | public int LVUpCostMoneyType; |
| | | public int LVUpCostMoney; |
| | | public int LVUpCostExp; |
| | | public int ClientActionLimit; |
| | | public int ClientSkillSeriesLimit; |
| | | public int SkillOfSeries; |
| | | public int ExpendMPRate; |
| | | public int ExAttr1; |
| | | public int ExAttr3; |
| | | public int ExAttr4; |
| | | public int ExAttr5; |
| | | public int BuffEffectID; |
| | | public int EffectName; |
| | | public string IconName; |
| | | public string Description; |
| | | public string BuffDescription; |
| | | public int BuffDisplay; |
| | | public int CastPosition; |
| | | public int CastDistance; |
| | | public int[] TriggerFrames; |
| | | public int[][] DamageDivide; |
| | | public string SkillMotionName; |
| | | public int EffectId; |
| | | public int ExplotionEffectId; |
| | | public float FlyTime; |
| | | |
| | | 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 SkillID); |
| | | |
| | | SkillName = tables[1]; |
| | | |
| | | int.TryParse(tables[2],out SkillTypeID); |
| | | |
| | | int.TryParse(tables[3],out SkillLV); |
| | | |
| | | int.TryParse(tables[4],out SkillMaxLV); |
| | | |
| | | int.TryParse(tables[5],out UseType); |
| | | |
| | | int.TryParse(tables[6],out FuncType); |
| | | |
| | | int.TryParse(tables[7],out CastTime); |
| | | |
| | | int.TryParse(tables[8],out SkillType); |
| | | |
| | | int.TryParse(tables[9],out HurtType); |
| | | |
| | | int.TryParse(tables[10],out ContinueUse); |
| | | |
| | | int.TryParse(tables[11],out AtkType); |
| | | |
| | | int.TryParse(tables[12],out AtkRadius); |
| | | |
| | | int.TryParse(tables[13],out Tag); |
| | | |
| | | int.TryParse(tables[14],out AtkDist); |
| | | |
| | | int.TryParse(tables[15],out StiffTime); |
| | | |
| | | int.TryParse(tables[16],out CoolDownTime); |
| | | |
| | | int.TryParse(tables[17],out MP); |
| | | |
| | | int.TryParse(tables[18],out HP); |
| | | |
| | | int.TryParse(tables[19],out XP); |
| | | |
| | | int.TryParse(tables[20],out UseItemID); |
| | | |
| | | int.TryParse(tables[21],out UseItemCount); |
| | | |
| | | int.TryParse(tables[22],out Effect1); |
| | | |
| | | int.TryParse(tables[23],out EffectValue11); |
| | | |
| | | int.TryParse(tables[24],out EffectValue12); |
| | | |
| | | int.TryParse(tables[25],out EffectValue13); |
| | | |
| | | int.TryParse(tables[26],out Effect2); |
| | | |
| | | int.TryParse(tables[27],out EffectValue21); |
| | | |
| | | int.TryParse(tables[28],out EffectValue22); |
| | | |
| | | int.TryParse(tables[29],out EffectValue23); |
| | | |
| | | int.TryParse(tables[30],out Effect3); |
| | | |
| | | int.TryParse(tables[31],out EffectValue31); |
| | | |
| | | int.TryParse(tables[32],out EffectValue32); |
| | | |
| | | int.TryParse(tables[33],out EffectValue33); |
| | | |
| | | int.TryParse(tables[34],out Effect4); |
| | | |
| | | int.TryParse(tables[35],out EffectValue41); |
| | | |
| | | int.TryParse(tables[36],out EffectValue42); |
| | | |
| | | int.TryParse(tables[37],out EffectValue43); |
| | | |
| | | int.TryParse(tables[38],out Effect5); |
| | | |
| | | int.TryParse(tables[39],out EffectValue51); |
| | | |
| | | int.TryParse(tables[40],out EffectValue52); |
| | | |
| | | int.TryParse(tables[41],out EffectValue53); |
| | | |
| | | int.TryParse(tables[42],out Effect6); |
| | | |
| | | int.TryParse(tables[43],out EffectValue61); |
| | | |
| | | int.TryParse(tables[44],out EffectValue62); |
| | | |
| | | int.TryParse(tables[45],out EffectValue63); |
| | | |
| | | int.TryParse(tables[46],out HappenRate6); |
| | | |
| | | int.TryParse(tables[47],out LastTime6); |
| | | |
| | | int.TryParse(tables[48],out SkillEnhance1); |
| | | |
| | | int.TryParse(tables[49],out SkillEnhance2); |
| | | |
| | | int.TryParse(tables[50],out StateSkillLV); |
| | | |
| | | int.TryParse(tables[51],out LearnSkillReq); |
| | | |
| | | int.TryParse(tables[52],out LearnSkillLV); |
| | | |
| | | int.TryParse(tables[53],out LearnLVReq); |
| | | |
| | | int.TryParse(tables[54],out LearnSkillPointReq); |
| | | |
| | | int.TryParse(tables[55],out FightPower); |
| | | |
| | | int.TryParse(tables[56],out LVUpCostMoneyType); |
| | | |
| | | int.TryParse(tables[57],out LVUpCostMoney); |
| | | |
| | | int.TryParse(tables[58],out LVUpCostExp); |
| | | |
| | | int.TryParse(tables[59],out ClientActionLimit); |
| | | |
| | | int.TryParse(tables[60],out ClientSkillSeriesLimit); |
| | | |
| | | int.TryParse(tables[61],out SkillOfSeries); |
| | | |
| | | int.TryParse(tables[62],out ExpendMPRate); |
| | | |
| | | int.TryParse(tables[63],out ExAttr1); |
| | | |
| | | int.TryParse(tables[64],out ExAttr3); |
| | | |
| | | int.TryParse(tables[65],out ExAttr4); |
| | | |
| | | int.TryParse(tables[66],out ExAttr5); |
| | | |
| | | int.TryParse(tables[67],out BuffEffectID); |
| | | |
| | | int.TryParse(tables[68],out EffectName); |
| | | |
| | | IconName = tables[69]; |
| | | |
| | | Description = tables[70]; |
| | | |
| | | BuffDescription = tables[71]; |
| | | |
| | | int.TryParse(tables[72],out BuffDisplay); |
| | | |
| | | int.TryParse(tables[73],out CastPosition); |
| | | |
| | | int.TryParse(tables[74],out CastDistance); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class SkillConfig : ConfigBase<int, SkillConfig>
|
| | | {
|
| | |
|
| | | public int SkillID;
|
| | | public string SkillName;
|
| | | public int SkillTypeID;
|
| | | public int SkillLV;
|
| | | public int SkillMaxLV;
|
| | | public int UseType;
|
| | | public int FuncType;
|
| | | public int CastTime;
|
| | | public int SkillType;
|
| | | public int HurtType;
|
| | | public int ContinueUse;
|
| | | public int AtkType;
|
| | | public int AtkRadius;
|
| | | public int Tag;
|
| | | public int AtkDist;
|
| | | public int StiffTime;
|
| | | public int CoolDownTime;
|
| | | public int MP;
|
| | | public int HP;
|
| | | public int XP;
|
| | | public int UseItemID;
|
| | | public int UseItemCount;
|
| | | public int Effect1;
|
| | | public int EffectValue11;
|
| | | public int EffectValue12;
|
| | | public int EffectValue13;
|
| | | public int Effect2;
|
| | | public int EffectValue21;
|
| | | public int EffectValue22;
|
| | | public int EffectValue23;
|
| | | public int Effect3;
|
| | | public int EffectValue31;
|
| | | public int EffectValue32;
|
| | | public int EffectValue33;
|
| | | public int Effect4;
|
| | | public int EffectValue41;
|
| | | public int EffectValue42;
|
| | | public int EffectValue43;
|
| | | public int Effect5;
|
| | | public int EffectValue51;
|
| | | public int EffectValue52;
|
| | | public int EffectValue53;
|
| | | public int Effect6;
|
| | | public int EffectValue61;
|
| | | public int EffectValue62;
|
| | | public int EffectValue63;
|
| | | public int HappenRate6;
|
| | | public int LastTime6;
|
| | | public int SkillEnhance1;
|
| | | public int SkillEnhance2;
|
| | | public int StateSkillLV;
|
| | | public int LearnSkillReq;
|
| | | public int LearnSkillLV;
|
| | | public int LearnLVReq;
|
| | | public int LearnSkillPointReq;
|
| | | public int FightPower;
|
| | | public int LVUpCostMoneyType;
|
| | | public int LVUpCostMoney;
|
| | | public int LVUpCostExp;
|
| | | public int ClientActionLimit;
|
| | | public int ClientSkillSeriesLimit;
|
| | | public int SkillOfSeries;
|
| | | public int ExpendMPRate;
|
| | | public int ExAttr1;
|
| | | public int ExAttr3;
|
| | | public int ExAttr4;
|
| | | public int ExAttr5;
|
| | | public int BuffEffectID;
|
| | | public int EffectName;
|
| | | public string IconName;
|
| | | public string Description;
|
| | | public string BuffDescription;
|
| | | public int BuffDisplay;
|
| | | public int CastPosition;
|
| | | public int CastDistance;
|
| | | public int[] TriggerFrames;
|
| | | public int[][] DamageDivide;
|
| | | public string SkillMotionName;
|
| | | public int EffectId;
|
| | | public int ExplotionEffectId;
|
| | | public float FlyTime;
|
| | |
|
| | | 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 SkillID); |
| | |
|
| | | SkillName = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out SkillTypeID); |
| | |
|
| | | int.TryParse(tables[3],out SkillLV); |
| | |
|
| | | int.TryParse(tables[4],out SkillMaxLV); |
| | |
|
| | | int.TryParse(tables[5],out UseType); |
| | |
|
| | | int.TryParse(tables[6],out FuncType); |
| | |
|
| | | int.TryParse(tables[7],out CastTime); |
| | |
|
| | | int.TryParse(tables[8],out SkillType); |
| | |
|
| | | int.TryParse(tables[9],out HurtType); |
| | |
|
| | | int.TryParse(tables[10],out ContinueUse); |
| | |
|
| | | int.TryParse(tables[11],out AtkType); |
| | |
|
| | | int.TryParse(tables[12],out AtkRadius); |
| | |
|
| | | int.TryParse(tables[13],out Tag); |
| | |
|
| | | int.TryParse(tables[14],out AtkDist); |
| | |
|
| | | int.TryParse(tables[15],out StiffTime); |
| | |
|
| | | int.TryParse(tables[16],out CoolDownTime); |
| | |
|
| | | int.TryParse(tables[17],out MP); |
| | |
|
| | | int.TryParse(tables[18],out HP); |
| | |
|
| | | int.TryParse(tables[19],out XP); |
| | |
|
| | | int.TryParse(tables[20],out UseItemID); |
| | |
|
| | | int.TryParse(tables[21],out UseItemCount); |
| | |
|
| | | int.TryParse(tables[22],out Effect1); |
| | |
|
| | | int.TryParse(tables[23],out EffectValue11); |
| | |
|
| | | int.TryParse(tables[24],out EffectValue12); |
| | |
|
| | | int.TryParse(tables[25],out EffectValue13); |
| | |
|
| | | int.TryParse(tables[26],out Effect2); |
| | |
|
| | | int.TryParse(tables[27],out EffectValue21); |
| | |
|
| | | int.TryParse(tables[28],out EffectValue22); |
| | |
|
| | | int.TryParse(tables[29],out EffectValue23); |
| | |
|
| | | int.TryParse(tables[30],out Effect3); |
| | |
|
| | | int.TryParse(tables[31],out EffectValue31); |
| | |
|
| | | int.TryParse(tables[32],out EffectValue32); |
| | |
|
| | | int.TryParse(tables[33],out EffectValue33); |
| | |
|
| | | int.TryParse(tables[34],out Effect4); |
| | |
|
| | | int.TryParse(tables[35],out EffectValue41); |
| | |
|
| | | int.TryParse(tables[36],out EffectValue42); |
| | |
|
| | | int.TryParse(tables[37],out EffectValue43); |
| | |
|
| | | int.TryParse(tables[38],out Effect5); |
| | |
|
| | | int.TryParse(tables[39],out EffectValue51); |
| | |
|
| | | int.TryParse(tables[40],out EffectValue52); |
| | |
|
| | | int.TryParse(tables[41],out EffectValue53); |
| | |
|
| | | int.TryParse(tables[42],out Effect6); |
| | |
|
| | | int.TryParse(tables[43],out EffectValue61); |
| | |
|
| | | int.TryParse(tables[44],out EffectValue62); |
| | |
|
| | | int.TryParse(tables[45],out EffectValue63); |
| | |
|
| | | int.TryParse(tables[46],out HappenRate6); |
| | |
|
| | | int.TryParse(tables[47],out LastTime6); |
| | |
|
| | | int.TryParse(tables[48],out SkillEnhance1); |
| | |
|
| | | int.TryParse(tables[49],out SkillEnhance2); |
| | |
|
| | | int.TryParse(tables[50],out StateSkillLV); |
| | |
|
| | | int.TryParse(tables[51],out LearnSkillReq); |
| | |
|
| | | int.TryParse(tables[52],out LearnSkillLV); |
| | |
|
| | | int.TryParse(tables[53],out LearnLVReq); |
| | |
|
| | | int.TryParse(tables[54],out LearnSkillPointReq); |
| | |
|
| | | int.TryParse(tables[55],out FightPower); |
| | |
|
| | | int.TryParse(tables[56],out LVUpCostMoneyType); |
| | |
|
| | | int.TryParse(tables[57],out LVUpCostMoney); |
| | |
|
| | | int.TryParse(tables[58],out LVUpCostExp); |
| | |
|
| | | int.TryParse(tables[59],out ClientActionLimit); |
| | |
|
| | | int.TryParse(tables[60],out ClientSkillSeriesLimit); |
| | |
|
| | | int.TryParse(tables[61],out SkillOfSeries); |
| | |
|
| | | int.TryParse(tables[62],out ExpendMPRate); |
| | |
|
| | | int.TryParse(tables[63],out ExAttr1); |
| | |
|
| | | int.TryParse(tables[64],out ExAttr3); |
| | |
|
| | | int.TryParse(tables[65],out ExAttr4); |
| | |
|
| | | int.TryParse(tables[66],out ExAttr5); |
| | |
|
| | | int.TryParse(tables[67],out BuffEffectID); |
| | |
|
| | | int.TryParse(tables[68],out EffectName); |
| | |
|
| | | IconName = tables[69];
|
| | |
|
| | | Description = tables[70];
|
| | |
|
| | | BuffDescription = tables[71];
|
| | |
|
| | | int.TryParse(tables[72],out BuffDisplay); |
| | |
|
| | | int.TryParse(tables[73],out CastPosition); |
| | |
|
| | | int.TryParse(tables[74],out CastDistance); |
| | |
|
| | | if (tables[75].Contains("[")) |
| | | { |
| | | TriggerFrames = JsonMapper.ToObject<int[]>(tables[75]); |
| | |
| | | { |
| | | int.TryParse(TriggerFramesStringArray[i],out TriggerFrames[i]); |
| | | } |
| | | } |
| | | |
| | | DamageDivide = JsonMapper.ToObject<int[][]>(tables[76].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | SkillMotionName = tables[77]; |
| | | |
| | | int.TryParse(tables[78],out EffectId); |
| | | |
| | | int.TryParse(tables[79],out ExplotionEffectId); |
| | | |
| | | float.TryParse(tables[80],out FlyTime); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | DamageDivide = JsonMapper.ToObject<int[][]>(tables[76].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | SkillMotionName = tables[77];
|
| | |
|
| | | int.TryParse(tables[78],out EffectId); |
| | |
|
| | | int.TryParse(tables[79],out ExplotionEffectId); |
| | |
|
| | | float.TryParse(tables[80],out FlyTime); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 StoreConfig : ConfigBase<int, StoreConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public int ShopType; |
| | | public int[] SecondType; |
| | | public int ShopSort; |
| | | public int ItemID; |
| | | public int ItemCnt; |
| | | public int IsBind; |
| | | public string ItemListEx; |
| | | public int MainItemID; |
| | | public string JobItem; |
| | | public int RefreshType; |
| | | public int[] VIPLV; |
| | | public int LV; |
| | | public int LVSee; |
| | | public int[] GoumaiNumber; |
| | | public int MoneyType; |
| | | public int MoneyNumber; |
| | | public int MoneyOriginal; |
| | | public int LimitValue; |
| | | public string SalesStatus; |
| | | public int TheOnlyShop; |
| | | public int RemindSuccess; |
| | | public int IsHideSellOut; |
| | | |
| | | 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); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class StoreConfig : ConfigBase<int, StoreConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public int ShopType;
|
| | | public int[] SecondType;
|
| | | public int ShopSort;
|
| | | public int ItemID;
|
| | | public int ItemCnt;
|
| | | public int IsBind;
|
| | | public string ItemListEx;
|
| | | public int MainItemID;
|
| | | public string JobItem;
|
| | | public int RefreshType;
|
| | | public int[] VIPLV;
|
| | | public int LV;
|
| | | public int LVSee;
|
| | | public int[] GoumaiNumber;
|
| | | public int MoneyType;
|
| | | public int MoneyNumber;
|
| | | public int MoneyOriginal;
|
| | | public int LimitValue;
|
| | | public string SalesStatus;
|
| | | public int TheOnlyShop;
|
| | | public int RemindSuccess;
|
| | | public int IsHideSellOut;
|
| | |
|
| | | 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); |
| | |
|
| | | if (tables[2].Contains("[")) |
| | | { |
| | | SecondType = JsonMapper.ToObject<int[]>(tables[2]); |
| | |
| | | { |
| | | int.TryParse(SecondTypeStringArray[i],out SecondType[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[3],out ShopSort); |
| | | |
| | | int.TryParse(tables[4],out ItemID); |
| | | |
| | | int.TryParse(tables[5],out ItemCnt); |
| | | |
| | | int.TryParse(tables[6],out IsBind); |
| | | |
| | | ItemListEx = tables[7]; |
| | | |
| | | int.TryParse(tables[8],out MainItemID); |
| | | |
| | | JobItem = tables[9]; |
| | | |
| | | int.TryParse(tables[10],out RefreshType); |
| | | |
| | | }
|
| | |
|
| | | int.TryParse(tables[3],out ShopSort); |
| | |
|
| | | int.TryParse(tables[4],out ItemID); |
| | |
|
| | | int.TryParse(tables[5],out ItemCnt); |
| | |
|
| | | int.TryParse(tables[6],out IsBind); |
| | |
|
| | | ItemListEx = tables[7];
|
| | |
|
| | | int.TryParse(tables[8],out MainItemID); |
| | |
|
| | | JobItem = tables[9];
|
| | |
|
| | | int.TryParse(tables[10],out RefreshType); |
| | |
|
| | | if (tables[11].Contains("[")) |
| | | { |
| | | VIPLV = JsonMapper.ToObject<int[]>(tables[11]); |
| | |
| | | { |
| | | int.TryParse(VIPLVStringArray[i],out VIPLV[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[12],out LV); |
| | | |
| | | int.TryParse(tables[13],out LVSee); |
| | | |
| | | }
|
| | |
|
| | | int.TryParse(tables[12],out LV); |
| | |
|
| | | int.TryParse(tables[13],out LVSee); |
| | |
|
| | | if (tables[14].Contains("[")) |
| | | { |
| | | GoumaiNumber = JsonMapper.ToObject<int[]>(tables[14]); |
| | |
| | | { |
| | | int.TryParse(GoumaiNumberStringArray[i],out GoumaiNumber[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[15],out MoneyType); |
| | | |
| | | int.TryParse(tables[16],out MoneyNumber); |
| | | |
| | | int.TryParse(tables[17],out MoneyOriginal); |
| | | |
| | | int.TryParse(tables[18],out LimitValue); |
| | | |
| | | SalesStatus = tables[19]; |
| | | |
| | | int.TryParse(tables[20],out TheOnlyShop); |
| | | |
| | | int.TryParse(tables[21],out RemindSuccess); |
| | | |
| | | int.TryParse(tables[22],out IsHideSellOut); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[15],out MoneyType); |
| | |
|
| | | int.TryParse(tables[16],out MoneyNumber); |
| | |
|
| | | int.TryParse(tables[17],out MoneyOriginal); |
| | |
|
| | | int.TryParse(tables[18],out LimitValue); |
| | |
|
| | | SalesStatus = tables[19];
|
| | |
|
| | | int.TryParse(tables[20],out TheOnlyShop); |
| | |
|
| | | int.TryParse(tables[21],out RemindSuccess); |
| | |
|
| | | int.TryParse(tables[22],out IsHideSellOut); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 SuccessConfig : ConfigBase<int, SuccessConfig> |
| | | { |
| | | |
| | | public int ID; |
| | | public int Type; |
| | | public int Group; |
| | | public int NeedCnt; |
| | | public int[] Condition; |
| | | public string Condition2; |
| | | public int Condition3; |
| | | public string AwardItemList; |
| | | public string AwardItemList2; |
| | | public string Money; |
| | | public int Exp; |
| | | public int[] AwardAttribute; |
| | | public int RedPacketID; |
| | | public int MagicWeaponID; |
| | | public string MagicWeaponExp; |
| | | public string Describe; |
| | | public int NeedGoto; |
| | | public int Jump; |
| | | public int ReOrder; |
| | | public int RealmPracticeID; |
| | | |
| | | 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 Type); |
| | | |
| | | int.TryParse(tables[2],out Group); |
| | | |
| | | int.TryParse(tables[3],out NeedCnt); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class SuccessConfig : ConfigBase<int, SuccessConfig>
|
| | | {
|
| | |
|
| | | public int ID;
|
| | | public int Type;
|
| | | public int Group;
|
| | | public int NeedCnt;
|
| | | public int[] Condition;
|
| | | public string Condition2;
|
| | | public int Condition3;
|
| | | public string AwardItemList;
|
| | | public string AwardItemList2;
|
| | | public string Money;
|
| | | public int Exp;
|
| | | public int[] AwardAttribute;
|
| | | public int RedPacketID;
|
| | | public int MagicWeaponID;
|
| | | public string MagicWeaponExp;
|
| | | public string Describe;
|
| | | public int NeedGoto;
|
| | | public int Jump;
|
| | | public int ReOrder;
|
| | | public int RealmPracticeID;
|
| | |
|
| | | 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 Type); |
| | |
|
| | | int.TryParse(tables[2],out Group); |
| | |
|
| | | int.TryParse(tables[3],out NeedCnt); |
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | Condition = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(ConditionStringArray[i],out Condition[i]); |
| | | } |
| | | } |
| | | |
| | | Condition2 = tables[5]; |
| | | |
| | | int.TryParse(tables[6],out Condition3); |
| | | |
| | | AwardItemList = tables[7]; |
| | | |
| | | AwardItemList2 = tables[8]; |
| | | |
| | | Money = tables[9]; |
| | | |
| | | int.TryParse(tables[10],out Exp); |
| | | |
| | | }
|
| | |
|
| | | Condition2 = tables[5];
|
| | |
|
| | | int.TryParse(tables[6],out Condition3); |
| | |
|
| | | AwardItemList = tables[7];
|
| | |
|
| | | AwardItemList2 = tables[8];
|
| | |
|
| | | Money = tables[9];
|
| | |
|
| | | int.TryParse(tables[10],out Exp); |
| | |
|
| | | if (tables[11].Contains("[")) |
| | | { |
| | | AwardAttribute = JsonMapper.ToObject<int[]>(tables[11]); |
| | |
| | | { |
| | | int.TryParse(AwardAttributeStringArray[i],out AwardAttribute[i]); |
| | | } |
| | | } |
| | | |
| | | int.TryParse(tables[12],out RedPacketID); |
| | | |
| | | int.TryParse(tables[13],out MagicWeaponID); |
| | | |
| | | MagicWeaponExp = tables[14]; |
| | | |
| | | Describe = tables[15]; |
| | | |
| | | int.TryParse(tables[16],out NeedGoto); |
| | | |
| | | int.TryParse(tables[17],out Jump); |
| | | |
| | | int.TryParse(tables[18],out ReOrder); |
| | | |
| | | int.TryParse(tables[19],out RealmPracticeID); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | int.TryParse(tables[12],out RedPacketID); |
| | |
|
| | | int.TryParse(tables[13],out MagicWeaponID); |
| | |
|
| | | MagicWeaponExp = tables[14];
|
| | |
|
| | | Describe = tables[15];
|
| | |
|
| | | int.TryParse(tables[16],out NeedGoto); |
| | |
|
| | | int.TryParse(tables[17],out Jump); |
| | |
|
| | | int.TryParse(tables[18],out ReOrder); |
| | |
|
| | | int.TryParse(tables[19],out RealmPracticeID); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 SysInfoConfig : ConfigBase<string, SysInfoConfig> |
| | | { |
| | | |
| | | public string key; |
| | | public string sound; |
| | | public string effect; |
| | | public int[] type; |
| | | public string richText; |
| | | public int order; |
| | | |
| | | public override string LoadKey(string _key) |
| | | { |
| | | string key = GetKey(_key); |
| | | return key; |
| | | } |
| | | |
| | | public override void LoadConfig(string input) |
| | | { |
| | | try { |
| | | string[] tables = input.Split('\t'); |
| | | key = tables[0]; |
| | | |
| | | sound = tables[1]; |
| | | |
| | | effect = tables[2]; |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class SysInfoConfig : ConfigBase<string, SysInfoConfig>
|
| | | {
|
| | |
|
| | | public string key;
|
| | | public string sound;
|
| | | public string effect;
|
| | | public int[] type;
|
| | | public string richText;
|
| | | public int order;
|
| | |
|
| | | public override string LoadKey(string _key)
|
| | | {
|
| | | string key = GetKey(_key);
|
| | | return key;
|
| | | }
|
| | |
|
| | | public override void LoadConfig(string input)
|
| | | {
|
| | | try {
|
| | | string[] tables = input.Split('\t');
|
| | | key = tables[0];
|
| | |
|
| | | sound = tables[1];
|
| | |
|
| | | effect = tables[2];
|
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | type = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(typeStringArray[i],out type[i]); |
| | | } |
| | | } |
| | | |
| | | richText = tables[4]; |
| | | |
| | | int.TryParse(tables[5],out order); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | richText = tables[4];
|
| | |
|
| | | int.TryParse(tables[5],out order); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 TitleStarUpConfig : ConfigBase<int, TitleStarUpConfig> |
| | | { |
| | | |
| | | public int id; |
| | | public int TitleID; |
| | | public int TitleStar; |
| | | public int[][] StarUpNeedItemList; |
| | | public int[] StarAttrType; |
| | | public int[] StarAttrValue; |
| | | |
| | | 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 TitleID); |
| | | |
| | | int.TryParse(tables[2],out TitleStar); |
| | | |
| | | StarUpNeedItemList = JsonMapper.ToObject<int[][]>(tables[3].Replace("(", "[").Replace(")", "]")); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class TitleStarUpConfig : ConfigBase<int, TitleStarUpConfig>
|
| | | {
|
| | |
|
| | | public int id;
|
| | | public int TitleID;
|
| | | public int TitleStar;
|
| | | public int[][] StarUpNeedItemList;
|
| | | public int[] StarAttrType;
|
| | | public int[] StarAttrValue;
|
| | |
|
| | | 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 TitleID); |
| | |
|
| | | int.TryParse(tables[2],out TitleStar); |
| | |
|
| | | StarUpNeedItemList = JsonMapper.ToObject<int[][]>(tables[3].Replace("(", "[").Replace(")", "]")); |
| | |
|
| | | if (tables[4].Contains("[")) |
| | | { |
| | | StarAttrType = JsonMapper.ToObject<int[]>(tables[4]); |
| | |
| | | { |
| | | int.TryParse(StarAttrTypeStringArray[i],out StarAttrType[i]); |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (tables[5].Contains("[")) |
| | | { |
| | | StarAttrValue = JsonMapper.ToObject<int[]>(tables[5]); |
| | |
| | | { |
| | | int.TryParse(StarAttrValueStringArray[i],out StarAttrValue[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: 2025年7月7日 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | public partial class TreeLVConfig : ConfigBase<int, TreeLVConfig> |
| | | { |
| | | |
| | | public int TreeLV; |
| | | public int LVUPNeedMoney; |
| | | public int LVUPNeedTime; |
| | | public int[] EquipColorRateList; |
| | | public string ExAwardItemRateList; |
| | | |
| | | 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 TreeLV); |
| | | |
| | | int.TryParse(tables[1],out LVUPNeedMoney); |
| | | |
| | | int.TryParse(tables[2],out LVUPNeedTime); |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class TreeLVConfig : ConfigBase<int, TreeLVConfig>
|
| | | {
|
| | |
|
| | | public int TreeLV;
|
| | | public int LVUPNeedMoney;
|
| | | public int LVUPNeedTime;
|
| | | public int[] EquipColorRateList;
|
| | | public string ExAwardItemRateList;
|
| | |
|
| | | 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 TreeLV); |
| | |
|
| | | int.TryParse(tables[1],out LVUPNeedMoney); |
| | |
|
| | | int.TryParse(tables[2],out LVUPNeedTime); |
| | |
|
| | | if (tables[3].Contains("[")) |
| | | { |
| | | EquipColorRateList = JsonMapper.ToObject<int[]>(tables[3]); |
| | |
| | | { |
| | | int.TryParse(EquipColorRateListStringArray[i],out EquipColorRateList[i]); |
| | | } |
| | | } |
| | | |
| | | ExAwardItemRateList = tables[4]; |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | ExAwardItemRateList = tables[4];
|
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: Friday, June 27, 2025
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System.IO;
|
| | | using System.Threading;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
| | | //-------------------------------------------------------- |
| | | // [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 priorbundleConfig : ConfigBase<int, priorbundleConfig> |
| | | { |
| | | |
| | | public int id; |
| | | public string AssetABName; |
| | | public int AssetType; |
| | | public int Prior; |
| | | public int mapId; |
| | | |
| | | 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); |
| | | |
| | | AssetABName = tables[1]; |
| | | |
| | | int.TryParse(tables[2],out AssetType); |
| | | |
| | | int.TryParse(tables[3],out Prior); |
| | | |
| | | int.TryParse(tables[4],out mapId); |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | | Debug.LogError(exception); |
| | | } |
| | | } |
| | | } |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年7月26日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using UnityEngine;
|
| | | using LitJson;
|
| | |
|
| | | public partial class priorbundleConfig : ConfigBase<int, priorbundleConfig>
|
| | | {
|
| | |
|
| | | public int id;
|
| | | public string AssetABName;
|
| | | public int AssetType;
|
| | | public int Prior;
|
| | | public int mapId;
|
| | |
|
| | | 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); |
| | |
|
| | | AssetABName = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out AssetType); |
| | |
|
| | | int.TryParse(tables[3],out Prior); |
| | |
|
| | | int.TryParse(tables[4],out mapId); |
| | | }
|
| | | catch (Exception exception)
|
| | | {
|
| | | Debug.LogError(exception);
|
| | | }
|
| | | }
|
| | | }
|
New file |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public partial class HeroLineupHaloConfig : ConfigBase<int, HeroLineupHaloConfig> |
| | | { |
| | | // 国家 数量 |
| | | public static Dictionary<int, Dictionary<int, HeroLineupHaloConfig>> configDics = new Dictionary<int, Dictionary<int, HeroLineupHaloConfig>>(); |
| | | |
| | | protected override void OnConfigParseCompleted() |
| | | { |
| | | |
| | | Dictionary<int, HeroLineupHaloConfig> tempDic = null; |
| | | if (!configDics.TryGetValue(Country, out tempDic)) |
| | | { |
| | | tempDic = new Dictionary<int, HeroLineupHaloConfig>(); |
| | | configDics.Add(Country, tempDic); |
| | | } |
| | | |
| | | tempDic[NeedHeroCount] = this; |
| | | } |
| | | |
| | | public static HeroLineupHaloConfig GetConfig(int country, int count) |
| | | { |
| | | if (!configDics.ContainsKey(country)) |
| | | { |
| | | return null; |
| | | } |
| | | if (!configDics[country].ContainsKey(count)) |
| | | { |
| | | return null; |
| | | } |
| | | return configDics[country][count]; |
| | | } |
| | | |
| | | } |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/Config/PartialConfigs/HeroLineupHaloConfig.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 7c4414e0cc0a8594a86f1c6dda522acb |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | |
| | | private static Dictionary<int, List<int>> outputDict = new Dictionary<int, List<int>>(); |
| | | |
| | | public static int[] baseAttrs = { 6, 7, 8 }; //攻防血 |
| | | |
| | | public static int[] basePerAttrs = { 16, 17, 18 }; //攻防血 百分比 |
| | | protected override void OnConfigParseCompleted() |
| | | { |
| | | List<PlayerPropertyConfig> list = null; |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | using Cysharp.Threading.Tasks; |
| | | |
| | | |
| | | public class GameObjectPoolManager : SingletonMonobehaviour<GameObjectPoolManager> |
| | | { |
| | | #if UNITY_EDITOR |
| | | private Dictionary<int, DebugItem> m_DebugInstIDDict = null; |
| | | private bool m_ShowDebugPanel = false; |
| | | private Vector2 m_ScrollPosition = Vector2.zero; |
| | | |
| | | private void OnGUI() |
| | | { |
| | | if (!m_ShowDebugPanel) return; |
| | | |
| | | GUILayout.BeginArea(new Rect(10, 10, 400, 600)); |
| | | GUILayout.BeginVertical("Box"); |
| | | m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, GUILayout.Width(380), GUILayout.Height(580)); |
| | | |
| | | GUILayout.Label("对象池调试面板", GUILayout.Height(30)); |
| | | GUILayout.Space(10); |
| | | |
| | | foreach (var poolEntry in m_PoolDict) |
| | | { |
| | | int prefabInstanceId = poolEntry.Key; |
| | | GameObjectPool pool = poolEntry.Value; |
| | | |
| | | GUILayout.BeginVertical("Box"); |
| | | GUILayout.Label($"池名称: {pool.Prefab.name}"); |
| | | GUILayout.Label($"活跃对象数: {pool.m_ActiveHashSet.Count}"); |
| | | GUILayout.Label($"空闲对象数: {pool.m_FreeQueue.Count}"); |
| | | int count = m_PoolUsageFrequency.TryGetValue(prefabInstanceId, out int frequency) ? frequency : 0; |
| | | GUILayout.Label($"使用频率: {count}"); |
| | | GUILayout.EndVertical(); |
| | | GUILayout.Space(5); |
| | | } |
| | | |
| | | GUILayout.EndScrollView(); |
| | | GUILayout.EndVertical(); |
| | | GUILayout.EndArea(); |
| | | } |
| | | |
| | | [UnityEditor.MenuItem("Tools/对象池/显示调试面板")] |
| | | private static void ToggleDebugPanel() |
| | | { |
| | | if (Instance != null) |
| | | { |
| | | Instance.m_ShowDebugPanel = !Instance.m_ShowDebugPanel; |
| | | } |
| | | } |
| | | #endif |
| | | // 池统计数据 |
| | | public Dictionary<int, PoolStats> PoolStatistics { get; private set; } = new Dictionary<int, PoolStats>(); |
| | | |
| | | public class PoolStats |
| | | { |
| | | public int TotalObjects { get; set; } |
| | | public int ActiveObjects { get; set; } |
| | | public int FreeObjects { get; set; } |
| | | public int UsageFrequency { get; set; } |
| | | } |
| | | |
| | | // 更新池统计数据 |
| | | private void UpdatePoolStats() |
| | | { |
| | | if (m_PoolDict == null) |
| | | return; |
| | | |
| | | foreach (var poolEntry in m_PoolDict) |
| | | { |
| | | int prefabInstanceId = poolEntry.Key; |
| | | GameObjectPool pool = poolEntry.Value; |
| | | |
| | | if (!PoolStatistics.ContainsKey(prefabInstanceId)) |
| | | { |
| | | PoolStatistics[prefabInstanceId] = new PoolStats(); |
| | | } |
| | | |
| | | PoolStats stats = PoolStatistics[prefabInstanceId]; |
| | | stats.TotalObjects = pool.m_ActiveHashSet.Count + pool.m_FreeQueue.Count; |
| | | stats.ActiveObjects = pool.m_ActiveHashSet.Count; |
| | | stats.FreeObjects = pool.m_FreeQueue.Count; |
| | | stats.UsageFrequency = m_PoolUsageFrequency.TryGetValue(prefabInstanceId, out int frequency) ? frequency : 0; |
| | | } |
| | | } |
| | | |
| | | |
| | | private Dictionary<int, GameObjectPool> m_PoolDict = null; |
| | | |
| | | // 不需要销毁的对象列表 |
| | | private List<int> dontDestoryGoInstIDList = null; |
| | | |
| | | private Transform m_TargetContainer; |
| | | |
| | | // 定期检查池的时间间隔(秒) |
| | | private float m_PoolCheckInterval = 600f; |
| | | |
| | | // 记录每个池的使用频率 |
| | | private Dictionary<int, int> m_PoolUsageFrequency = new Dictionary<int, int>(); |
| | | |
| | | //需要动态卸载的预制体,例如切换场景时 |
| | | public List<GameObject> needDestroyPrefabList = new List<GameObject>(); |
| | |
| | | dontDestoryGoInstIDList = new List<int>(); |
| | | } |
| | | |
| | | #if UNITY_EDITOR |
| | | if (m_DebugInstIDDict == null) |
| | | // 启动定期检查池的协程 |
| | | CheckPoolUsage(); |
| | | } |
| | | |
| | | private async UniTask CheckPoolUsage() |
| | | { |
| | | while (true) |
| | | { |
| | | m_DebugInstIDDict = new Dictionary<int, DebugItem>(); |
| | | await UniTask.Delay(TimeSpan.FromSeconds(m_PoolCheckInterval)); |
| | | |
| | | foreach (var poolEntry in m_PoolDict) |
| | | { |
| | | int prefabInstanceId = poolEntry.Key; |
| | | GameObjectPool pool = poolEntry.Value; |
| | | |
| | | // 如果池的使用频率低于阈值,减少池的大小 |
| | | if (m_PoolUsageFrequency.TryGetValue(prefabInstanceId, out int usageCount) && usageCount < 5) |
| | | { |
| | | // 保留至少一个对象,避免频繁创建和销毁 |
| | | int targetSize = Mathf.Max(1, pool.m_FreeQueue.Count / 2); |
| | | while (pool.m_FreeQueue.Count > targetSize) |
| | | { |
| | | GameObject obj = pool.m_FreeQueue.Dequeue(); |
| | | if (!dontDestoryGoInstIDList.Contains(obj.GetInstanceID())) |
| | | { |
| | | Destroy(obj); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 重置使用频率 |
| | | m_PoolUsageFrequency[prefabInstanceId] = 0; |
| | | } |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public void AddDontDestroyGoInstID(int id) |
| | |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 传入的为预制体,而非组件,否则会导致GetInstanceID管理混乱,每次实例化都会改变 |
| | | /// </summary> |
| | | /// <param name="prefab"></param> |
| | | /// <returns></returns> |
| | | public GameObjectPool RequestPool(GameObject prefab) |
| | | { |
| | | if (prefab == null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | #if UNITY_EDITOR |
| | | if (UnityEditor.PrefabUtility.GetPrefabAssetType(prefab) == UnityEditor.PrefabAssetType.NotAPrefab) |
| | | { |
| | | Debug.LogError($"{prefab.name}不是一个预制体!"); |
| | | return null; |
| | | } |
| | | #endif |
| | | |
| | | |
| | | int _prefabInstanceId = prefab.GetInstanceID(); |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | #if UNITY_EDITOR |
| | | if (UnityEditor.PrefabUtility.GetPrefabAssetType(prefab) == UnityEditor.PrefabAssetType.NotAPrefab) |
| | | { |
| | | Debug.LogError($"{prefab.name}不是一个预制体!"); |
| | | return null; |
| | | } |
| | | #endif |
| | | return RequestPool(prefab).Request(); |
| | | } |
| | | |
| | | |
| | | //特定情况下需要动态卸载的,如切换场景时 |
| | | public void UnLoadAll(bool force = false) |
| | |
| | | } |
| | | |
| | | public HashSet<GameObject> m_ActiveHashSet = new HashSet<GameObject>(); |
| | | private Queue<GameObject> m_FreeQueue = null; |
| | | private int Pool_FreeList_Warning_Threshold = 8; |
| | | public Queue<GameObject> m_FreeQueue = null; |
| | | private int Pool_FreeList_Warning_Threshold = 10; //当空闲对象高于此值时,会进行日志输出提醒 |
| | | |
| | | Action<GameObject> releaseCallBack; |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | private Transform m_DebugContainer; |
| | | private Transform m_DebugActive; |
| | | private Transform m_DebugFree; |
| | | #endif |
| | | |
| | | |
| | | public string assetBundleName; |
| | | public string assetName; |
| | |
| | | m_ActiveHashSet = new HashSet<GameObject>(); |
| | | m_FreeQueue = new Queue<GameObject>(); |
| | | |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | m_DebugContainer = new GameObject(prefab.name).transform; |
| | | m_DebugActive = new GameObject("Active").transform; |
| | | m_DebugFree = new GameObject("Free").transform; |
| | | m_DebugActive.SetParent(m_DebugContainer); |
| | | m_DebugFree.SetParent(m_DebugContainer); |
| | | m_DebugContainer.SetParent(Instance.transform); |
| | | #endif |
| | | } |
| | | |
| | | public void AddReleaseListener(Action<GameObject> _callBack) |
| | |
| | | _go.transform.position = Constants.Special_Hide_Position; |
| | | |
| | | |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | #if UNITY_EDITOR |
| | | // 检查空闲列表数量是否超过阈值 |
| | | if (m_FreeList.Count > Pool_FreeList_Warning_Threshold) |
| | | if (m_FreeQueue.Count > Pool_FreeList_Warning_Threshold) |
| | | { |
| | | Debug.LogWarning($"GameObjectPool {m_Prefab.name} 的空闲对象数量 ({m_FreeList.Count}) 超过阈值 ({Pool_FreeList_Warning_Threshold}),请检查是否需要清理。"); |
| | | Debug.LogWarning($"GameObjectPool {m_Prefab.name} 的空闲对象数量 ({m_FreeQueue.Count}) 超过阈值 ({Pool_FreeList_Warning_Threshold}),请检查是否需要清理。"); |
| | | } |
| | | |
| | | DebugItem _debugItem = new GameObject(_go.GetInstanceID().ToString()).AddMissingComponent<DebugItem>(); |
| | | _debugItem.transform.SetParent(m_DebugFree); |
| | | _debugItem.target = _go; |
| | | Instance.m_DebugInstIDDict[_go.GetInstanceID()] = _debugItem; |
| | | #endif |
| | | var animator = _go.GetComponent<Animator>(); |
| | | if (animator != null) |
| | |
| | | |
| | | m_ActiveHashSet.Add(_go); |
| | | |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | if (Instance.m_DebugInstIDDict.ContainsKey(_go.GetInstanceID())) |
| | | // 统计池的使用频率 |
| | | if (Instance.m_PoolUsageFrequency.ContainsKey(m_Prefab.GetInstanceID())) |
| | | { |
| | | DebugItem _debugItem = Instance.m_DebugInstIDDict[_go.GetInstanceID()]; |
| | | _debugItem.transform.SetParent(m_DebugActive); |
| | | Instance.m_PoolUsageFrequency[m_Prefab.GetInstanceID()]++; |
| | | } |
| | | #endif |
| | | else |
| | | { |
| | | Instance.m_PoolUsageFrequency[m_Prefab.GetInstanceID()] = 1; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | _go = Instantiate(m_Prefab, Constants.Special_Hide_Position, Quaternion.identity); |
| | | m_ActiveHashSet.Add(_go); |
| | | |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | DebugItem _debugItem = new GameObject(_go.GetInstanceID().ToString()).AddMissingComponent<DebugItem>(); |
| | | _debugItem.transform.SetParent(m_DebugActive); |
| | | _debugItem.target = _go; |
| | | Instance.m_DebugInstIDDict[_go.GetInstanceID()] = _debugItem; |
| | | #endif |
| | | } |
| | | |
| | | _go.transform.SetParent(null); |
| | | _go.transform.localScale = Vector3.one; |
| | | |
| | | // 更新池统计数据 |
| | | Instance.UpdatePoolStats(); |
| | | |
| | | return _go; |
| | | } |
| | | |
| | | |
| | | public void Release(GameObject go) |
| | | { |
| | |
| | | |
| | | m_FreeQueue.Enqueue(go); |
| | | go.transform.SetParent(Instance.m_TargetContainer); |
| | | |
| | | go.transform.position = Constants.Special_Hide_Position; |
| | | |
| | | |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | #if UNITY_EDITOR |
| | | // 检查空闲列表数量是否超过阈值 |
| | | if (m_FreeList.Count > Pool_FreeList_Warning_Threshold) |
| | | if (m_FreeQueue.Count > Pool_FreeList_Warning_Threshold) |
| | | { |
| | | Debug.LogWarning($"GameObjectPool {m_Prefab.name} 的空闲对象数量 ({m_FreeList.Count}) 超过阈值 ({Pool_FreeList_Warning_Threshold}),请检查是否需要清理。"); |
| | | } |
| | | if (Instance.m_DebugInstIDDict.ContainsKey(go.GetInstanceID())) |
| | | { |
| | | DebugItem _debugItem = Instance.m_DebugInstIDDict[go.GetInstanceID()]; |
| | | _debugItem.transform.SetParent(m_DebugFree); |
| | | Debug.LogWarning($"GameObjectPool {m_Prefab.name} 的空闲对象数量 ({m_FreeQueue.Count}) 超过阈值 ({Pool_FreeList_Warning_Threshold}),请检查是否需要清理。"); |
| | | } |
| | | #endif |
| | | |
| | |
| | | { |
| | | releaseCallBack(go); |
| | | } |
| | | |
| | | // 更新池统计数据 |
| | | Instance.UpdatePoolStats(); |
| | | } |
| | | |
| | | public void ReleaseAll() |
| | |
| | | go.transform.SetParent(Instance.m_TargetContainer); |
| | | go.transform.position = Constants.Special_Hide_Position; |
| | | |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | if (Instance.m_DebugInstIDDict.ContainsKey(go.GetInstanceID())) |
| | | { |
| | | DebugItem _debugItem = Instance.m_DebugInstIDDict[go.GetInstanceID()]; |
| | | _debugItem.transform.SetParent(m_DebugFree); |
| | | } |
| | | #endif |
| | | if (releaseCallBack != null) |
| | | { |
| | | releaseCallBack(go); |
| | |
| | | |
| | | } |
| | | m_ActiveHashSet.Clear(); |
| | | |
| | | // 更新池统计数据 |
| | | Instance.UpdatePoolStats(); |
| | | } |
| | | |
| | | public void Clear() |
| | |
| | | |
| | | } |
| | | |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | #if UNITY_EDITOR |
| | | if (m_ActiveHashSet.Count != 0) |
| | | { |
| | | Debug.LogWarningFormat("{0} 池清理后, 还有 {1} 个活跃对象. ", m_Prefab.name, m_ActiveHashSet.Count); |
| | |
| | | m_FreeQueue = tempQueue; |
| | | |
| | | |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | if (m_FreeList.Count != 0) |
| | | #if UNITY_EDITOR |
| | | if (m_FreeQueue.Count != 0) |
| | | { |
| | | Debug.LogWarningFormat("{0} 池清理后, 还有 {1} 个空闲对象. ", m_Prefab.name, m_FreeList.Count); |
| | | Debug.LogWarningFormat("{0} 池清理后, 还有 {1} 个空闲对象. ", m_Prefab.name, m_FreeQueue.Count); |
| | | // for (int i = 0; i < m_FreeList.Count; ++i) |
| | | // { |
| | | // Debug.LogWarningFormat(" |-- {0}", m_FreeList[i].name); |
| | |
| | | if (IsEmpty()) |
| | | { |
| | | m_Prefab = null; |
| | | #if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS |
| | | Destroy(m_DebugContainer.gameObject); |
| | | #endif |
| | | |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(assetBundleName) && !string.IsNullOrEmpty(assetName)) |
| | |
| | | |
| | | |
| | | //上阵属性:攻防血 |
| | | public int GetGoBattleAddPer() |
| | | public int GetOnBattleAddPer() |
| | | { |
| | | return qualityConfig.InitAddPer + qualityConfig.LVAddPer * heroLevel + qualityConfig.BreakLVAddPer * breakLevel + qualityConfig.StarAddPer * heroStar; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | //是否主线上阵 81 # 所在阵容信息列表 [阵容类型*10000+阵型类型*100+位置编号, ...] |
| | | public bool isInMainBattle |
| | | { |
| | | get |
| | | { |
| | | //从列表中找到 阵容为1的 主线阵容 |
| | | var list = itemHero.GetUseData(81); |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | var index = list.FindIndex((item) => item / 10000 == 1); |
| | | if (index >= 0) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | // 优先功能提醒类型:1觉醒 2升级 3突破 4升星 |
| | | // 优先顺序: |
| | | public int funcState |
| | |
| | | } |
| | | |
| | | public bool isLock |
| | | { |
| | | { |
| | | get |
| | | { |
| | | return itemHero.itemInfo.isLock; |
| | |
| | | { |
| | | return heroConfig.GetInheritPercent(attrType); |
| | | } |
| | | |
| | | //是否上x阵 81 # 所在阵容信息列表 [阵容类型*10000+阵型类型*100+位置编号, ...] |
| | | public bool IsInTeamByTeamType(TeamType teamType) |
| | | { |
| | | var list = itemHero.GetUseData(81); |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | var index = list.FindIndex((item) => item / 10000 == (int)teamType); |
| | | if (index >= 0) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | //初始创建(0725),后续跟随背包事件增加删除 key = guid |
| | | protected Dictionary<string, HeroInfo> heroInfoDict = new Dictionary<string, HeroInfo>(); |
| | | |
| | | //武将列表界面 |
| | | public List<string> heroSortList = new List<string>(); |
| | | |
| | | |
| | | //武将红点 |
| | | //MainRedDot.HeroCardRedpoint * 1000 + hero.itemHero.gridIndex; |
| | |
| | | |
| | | void OnBeforePlayerDataInitialize() |
| | | { |
| | | heroSortList.Clear(); |
| | | |
| | | heroInfoDict.Clear(); |
| | | } |
| | | |
| | |
| | | { |
| | | return heroInfoDict.Values.ToList(); |
| | | } |
| | | |
| | | public List<string> GetHeroGuidList() |
| | | { |
| | | return heroInfoDict.Keys.ToList(); |
| | | } |
| | | |
| | | public List<HeroInfo> GetPowerfulHeroList() |
| | | { |
| | |
| | | return retList; |
| | | } |
| | | |
| | | public bool waitResortHeroList = false; |
| | | |
| | | |
| | | //刷新时机, 打开武将界面 或者 关闭功能界面 |
| | | public void SortHeroList() |
| | | { |
| | | heroSortList = heroInfoDict.Keys.ToList(); |
| | | heroSortList.Sort(CmpHero); |
| | | } |
| | | |
| | | |
| | | int CmpHero(string guidA, string guidB) |
| | | { |
| | | HeroInfo heroA = heroInfoDict[guidA]; |
| | | HeroInfo heroB = heroInfoDict[guidB]; |
| | | if (heroA == null || heroB == null) |
| | | { |
| | | return 0; |
| | | } |
| | | // 排序规则:上阵>武将等级>突破等级>武将觉醒阶级>武将品质>武将吞噬星级>武将ID |
| | | if (heroA.isInMainBattle != heroB.isInMainBattle) |
| | | { |
| | | return heroA.isInMainBattle ? -1 : 1; |
| | | } |
| | | if (heroA.heroLevel != heroB.heroLevel) |
| | | { |
| | | return heroA.heroLevel > heroB.heroLevel ? -1 : 1; |
| | | } |
| | | if (heroA.breakLevel != heroB.breakLevel) |
| | | { |
| | | return heroA.breakLevel > heroB.breakLevel ? -1 : 1; |
| | | } |
| | | if (heroA.awakeLevel != heroB.awakeLevel) |
| | | { |
| | | return heroA.awakeLevel > heroB.awakeLevel ? -1 : 1; |
| | | } |
| | | if (heroA.Quality != heroB.Quality) |
| | | { |
| | | return heroA.Quality > heroB.Quality ? -1 : 1; |
| | | } |
| | | if (heroA.heroStar != heroA.heroStar) |
| | | { |
| | | return heroA.heroStar > heroB.heroStar ? -1 : 1; |
| | | } |
| | | |
| | | return heroA.heroId.CompareTo(heroB.heroId); |
| | | } |
| | | |
| | | } |
| | |
| | | using UnityEngine.EventSystems; |
| | | public class UIHeroController : MonoBehaviour |
| | | { |
| | | private GameObjectPoolManager.GameObjectPool pool; |
| | | private int skinID; |
| | | protected SkeletonGraphic skeletonGraphic; |
| | | |
| | | protected Spine.AnimationState spineAnimationState; |
| | | private GameObject instanceGO; |
| | | |
| | | private Action onComplete; |
| | | public void Create(int _skinID, float scale = 1f, Action _onComplete = null) |
| | | { |
| | | if (skinID == _skinID) |
| | | { |
| | | //避免重复创建 |
| | | return; |
| | | } |
| | | |
| | | skinID = _skinID; |
| | | onComplete = _onComplete; |
| | | GameObject battleGO = UILoader.LoadPrefab("UIHero"); |
| | | GameObject instanceGO = null; |
| | | pool = GameObjectPoolManager.Instance.RequestPool(UILoader.LoadPrefab("UIHero")); |
| | | |
| | | if (!transform.gameObject.activeSelf) |
| | | { |
| | | transform.SetActive(true); |
| | | } |
| | | instanceGO = GameObject.Instantiate(battleGO, transform); |
| | | if (instanceGO == null) |
| | | { |
| | | instanceGO = pool.Request(); |
| | | instanceGO.transform.SetParent(transform); |
| | | //transform 的Pivot Y是0,让instanceGO 居中 |
| | | instanceGO.transform.localPosition = new Vector3(0, transform.GetComponent<RectTransform>().sizeDelta.y * 0.5f); |
| | | |
| | | //instanceGO.transform.localPosition = Vector3.zero; |
| | | instanceGO.transform.localScale = Vector3.one; |
| | | instanceGO.transform.localRotation = Quaternion.identity; |
| | | } |
| | | |
| | | skeletonGraphic = instanceGO.GetComponentInChildren<SkeletonGraphic>(true); |
| | | var skinConfig = HeroSkinConfig.Get(skinID); |
| | | skeletonGraphic.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("Hero/SpineRes/", skinConfig.SpineRes + "_SkeletonData"); |
| | |
| | | this.transform.localScale = Vector3.one * scale; |
| | | spineAnimationState = skeletonGraphic.AnimationState; |
| | | PlayAnimation(MotionName.idle, true); |
| | | |
| | | spineAnimationState.Complete -= OnAnimationComplete; |
| | | spineAnimationState.Complete += OnAnimationComplete; |
| | | } |
| | | private int skinID; |
| | | protected SkeletonGraphic skeletonGraphic; |
| | | |
| | | protected Spine.AnimationState spineAnimationState; |
| | | |
| | | private Spine.TrackEntry currentTrackEntry; |
| | | private Action onComplete; |
| | | |
| | | |
| | | |
| | | void Destroy() |
| | | |
| | | protected void OnDestroy() |
| | | { |
| | | spineAnimationState.Complete -= OnAnimationComplete; |
| | | if (spineAnimationState != null) |
| | | { |
| | | spineAnimationState.Complete -= OnAnimationComplete; |
| | | } |
| | | if (pool != null) |
| | | pool.Release(instanceGO); |
| | | skeletonGraphic = null; |
| | | pool = null; |
| | | } |
| | | |
| | | |
| | | public virtual Spine.TrackEntry PlayAnimation(MotionName motionName, bool loop = false) |
| | | public virtual void PlayAnimation(MotionName motionName, bool loop = false) |
| | | { |
| | | if (spineAnimationState == null) return null; |
| | | if (spineAnimationState == null) return; |
| | | |
| | | // 直接使用 ToString() 而不是调用 GetAnimationName |
| | | currentTrackEntry = spineAnimationState.SetAnimation(0, motionName.ToString(), loop); |
| | | return currentTrackEntry; |
| | | spineAnimationState.SetAnimation(0, motionName.ToString(), loop); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | public void Display(int index) |
| | | { |
| | | var hero = HeroManager.Instance.GetHero(HeroManager.Instance.heroSortList[index]); |
| | | var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroSortList[index]); |
| | | if (hero == null) |
| | | { |
| | | this.gameObject.SetActive(false); |
| | |
| | | countryImg.SetSprite("herocountry" + heroConfig.Country); |
| | | jobImg.SetSprite("herojob" + heroConfig.Class); |
| | | heroModel.Create(heroConfig.SkinIDList[hero.SkinIndex], heroConfig.UIScale); |
| | | onStateImg.SetActive(hero.isInMainBattle); |
| | | onStateImg.SetActive(hero.IsInTeamByTeamType(TeamType.Story)); |
| | | |
| | | redpoint.redpointId = MainRedDot.HeroCardRedpoint * 1000 + hero.itemHero.gridIndex; |
| | | var funcState = hero.funcState; |
| | |
| | | using UnityEngine; |
| | | using System.Collections.Generic; |
| | | |
| | | public class HeroCardLineCell : CellView |
| | | { |
| | | [SerializeField] List<HeroCardCell> cardList; |
| | | [SerializeField] HeroCardCell[] cardList; |
| | | |
| | | public void Display(int index) |
| | | { |
| | | for (int i = 0; i < cardList.Count; i++) |
| | | for (int i = 0; i < cardList.Length; i++) |
| | | { |
| | | if (i + index < HeroManager.Instance.heroSortList.Count) |
| | | if (i + index < HeroUIManager.Instance.heroSortList.Count) |
| | | { |
| | | cardList[i].SetActive(true); |
| | | cardList[i].Display(index + i); |
New file |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | //羁绊模块 |
| | | public class HeroConnectionCell : MonoBehaviour |
| | | { |
| | | [SerializeField] HeroConnectionHeadCell[] heros; |
| | | [SerializeField] Text connAttrText; |
| | | |
| | | public void Display() |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/System/HeroUI/HeroConnectionCell.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: d9e6754a2b2ddd242a8da5b215186a22 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
New file |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | //羁绊中的武将 |
| | | public class HeroConnectionHeadCell : MonoBehaviour |
| | | { |
| | | [SerializeField] Image qualityImg; |
| | | [SerializeField] Image heroIcon; |
| | | [SerializeField] Text nameText; |
| | | [SerializeField] Image connMarkImg; //链接的锁图标,第一个不显示 |
| | | |
| | | public void Display(int heroID, int index, string guid = "") |
| | | { |
| | | int skinID = 0; |
| | | HeroConfig heroConfig; |
| | | if (!string.IsNullOrEmpty(guid)) |
| | | { |
| | | var hero = HeroManager.Instance.GetHero(guid); |
| | | skinID = hero.SkinID; |
| | | heroConfig = hero.heroConfig; |
| | | } |
| | | else |
| | | { |
| | | heroConfig = HeroConfig.Get(heroID); |
| | | skinID = heroConfig.SkinIDList[0]; //默认第一个图鉴展示 |
| | | |
| | | } |
| | | |
| | | nameText.text = heroConfig.Name; |
| | | qualityImg.SetSprite("heroheadBG" + heroConfig.Quality); |
| | | var sprite = UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(skinID).SquareIcon); |
| | | if (sprite == null) |
| | | { |
| | | // 内网未配置时 |
| | | heroIcon.SetSprite("herohead_default"); |
| | | } |
| | | else |
| | | { |
| | | heroIcon.overrideSprite = sprite; |
| | | } |
| | | |
| | | connMarkImg.SetActive(index != 0); |
| | | } |
| | | } |
| | | |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/System/HeroUI/HeroConnectionHeadCell.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 82e5125576855304da53130b59ab10c3 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | |
| | | var sprite = UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(skinID).SquareIcon); |
| | | if (sprite == null) |
| | | { |
| | | // 内网未配置时 |
| | | heroIcon.SetSprite("herohead_default"); |
| | | } |
| | | else |
| | |
| | | [SerializeField] GameObject attrOnTip; |
| | | [SerializeField] Button attrOnTipBtn; |
| | | |
| | | [SerializeField] GameObject foldObject; |
| | | [SerializeField] Button unFoldBtn; //展开按钮 |
| | | [SerializeField] List<Button> countryBtnList; |
| | | [SerializeField] GameObject unFoldObject; |
| | | [SerializeField] Button foldBtn; //收起按钮 |
| | | [SerializeField] List<Button> jobBtnList; //全部,输出、肉盾、辅助、控制 |
| | | [SerializeField] Button changeHeroPosBtn; //布阵按钮 |
| | | |
| | | |
| | | private List<Image> countrySelectImgList; |
| | | private List<Image> jobSelectImgList; |
| | | |
| | | SinglePack singlePack; |
| | | |
| | | /// </summary> |
| | | protected override void InitComponent() |
| | | { |
| | | heroPackBtn.onClick.AddListener(() => |
| | | heroPackBtn.AddListener(() => |
| | | { |
| | | HeroUIManager.Instance.QueryUnLockHeroPack(); |
| | | }); |
| | | changeHeroPosBtn.AddListener(() => |
| | | { |
| | | HeroUIManager.Instance.selectTeamType = TeamType.Story; |
| | | UIManager.Instance.OpenWindow<HeroPosWin>(); |
| | | }); |
| | | } |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | singlePack = PackManager.Instance.GetSinglePack(PackType.Hero); |
| | | heroListScroller.OnRefreshCell += OnRefreshCell; |
| | | //需要考虑调整为武将的事件,而不是背包 |
| | | PackManager.Instance.RefreshItemEvent += RefreshPakCount; |
| | | HeroManager.Instance.SortHeroList(); |
| | | HeroUIManager.Instance.SortHeroList(); |
| | | CreateScroller(); |
| | | Refresh(); |
| | | } |
| | |
| | | |
| | | public override void Refresh() |
| | | { |
| | | SinglePack singlePack = PackManager.Instance.GetSinglePack(PackType.Hero); |
| | | if (singlePack == null || singlePack.GetAllItems().Count <= 0) |
| | | { |
| | | heroListEmpty.SetActive(true); |
| | |
| | | heroListScroller.SetActive(true); |
| | | } |
| | | |
| | | OnBattleTeamAttrPer(); |
| | | |
| | | RefreshPakCount(PackType.Hero, 0, 0); |
| | | } |
| | | |
| | | //上阵加成 |
| | | void OnBattleTeamAttrPer() |
| | | { |
| | | var valuePer = 0; |
| | | var team = TeamManager.Instance.GetTeam(TeamType.Story); |
| | | if (team != null) |
| | | { |
| | | for (int i = 0; i < team.serverData.Length; i++) |
| | | { |
| | | var hero = HeroManager.Instance.GetHero(team.serverData[i].guid); |
| | | if (hero != null) |
| | | { |
| | | valuePer += hero.GetOnBattleAddPer(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | //上阵属性 |
| | | for (int i = 0; i < attrOnList.Count; i++) |
| | | { |
| | | attrOnList[i].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.baseAttrs[i], 1)); |
| | | attrOnList[i].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.basePerAttrs[i], valuePer)); |
| | | } |
| | | |
| | | RefreshPakCount(PackType.Hero, 0, 0); |
| | | } |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | |
| | | void CreateScroller() |
| | | { |
| | | heroListScroller.Refresh(); |
| | | for (int i = 0; i < HeroManager.Instance.heroSortList.Count; i++) |
| | | for (int i = 0; i < HeroUIManager.Instance.heroSortList.Count; i++) |
| | | { |
| | | if (i % 4 == 0) |
| | | { |
| | |
| | | { |
| | | if (type != PackType.Hero) |
| | | return; |
| | | SinglePack singlePack = PackManager.Instance.GetSinglePack(PackType.Hero); |
| | | if (singlePack == null) |
| | | return; |
| | | |
New file |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class HeroPosHeadCell : MonoBehaviour |
| | | { |
| | | [SerializeField] HeroHeadBaseCell heroHeadBaseCell; |
| | | [SerializeField] Image jobImg; |
| | | [SerializeField] Text nameText; |
| | | [SerializeField] Transform selectRect; |
| | | |
| | | public void Display(int index) |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
File was renamed from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 85d03e47b5934534baabc6d5091adaa5 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
New file |
| | |
| | | using UnityEngine; |
| | | |
| | | public class HeroPosLineCell : CellView |
| | | { |
| | | [SerializeField] HeroPosHeadCell[] cardList; |
| | | |
| | | public void Display(int index) |
| | | { |
| | | for (int i = 0; i < cardList.Length; i++) |
| | | { |
| | | if (i + index < HeroUIManager.Instance.heroOnTeamSortList.Count) |
| | | { |
| | | cardList[i].SetActive(true); |
| | | cardList[i].Display(index + i); |
| | | } |
| | | else |
| | | { |
| | | cardList[i].SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/System/HeroUI/HeroPosLineCell.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 22807977a993b4b438ca473603f2494e |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | /// <summary> |
| | | /// 武将布阵: functionOrder:布阵类型 |
| | | /// </summary> |
| | | public class HeroPosWin : UIBase |
| | | { |
| | | [SerializeField] Text[] attrOnList; //上阵属性加成 |
| | | [SerializeField] Image countryOnImg; //上阵阵型激活国家 |
| | | [SerializeField] List<Image> OnCountImgs; //上阵数量激活 |
| | | [SerializeField] List<Image> scenePosImgs; //场景布阵位置 |
| | | [SerializeField] HeroScenePosCell[] sceneHero; |
| | | |
| | | [SerializeField] GroupButtonEx attackTeamBtn; |
| | | [SerializeField] GroupButtonEx defendTeamBtn; |
| | | |
| | | [SerializeField] Text fightPowerText; //由客户端自己预算的战力 |
| | | [SerializeField] ScrollerController heroListScroller; |
| | | [SerializeField] Transform heroListEmpty; |
| | | [SerializeField] Toggle showConnTipToggleBtn; |
| | | [SerializeField] HeroSelectBehaviour fiterManager; //武将筛选 |
| | | |
| | | [SerializeField] Button oneKeyOnBtn; //一键上阵 |
| | | [SerializeField] Button saveBtn; //保存阵型 |
| | | [SerializeField] Button backBtn; //退出界面 |
| | | [SerializeField] GroupButtonEx jjcBtn; //竞技场 |
| | | [SerializeField] GroupButtonEx tttBtn; //通天塔 |
| | | [SerializeField] GroupButtonEx mainFBBtn; //主线副本 |
| | | |
| | | //羁绊 |
| | | [SerializeField] HeroConnectionCell connetionForm; |
| | | |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | attackTeamBtn.AddListener(() => |
| | | { |
| | | if (HeroUIManager.Instance.selectTeamType == TeamType.Arena) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | HeroUIManager.Instance.selectTeamType = TeamType.Arena; |
| | | Refresh(); |
| | | }); |
| | | defendTeamBtn.AddListener(() => |
| | | { |
| | | if (HeroUIManager.Instance.selectTeamType == TeamType.ArenaDefense) |
| | | { |
| | | return; |
| | | } |
| | | HeroUIManager.Instance.selectTeamType = TeamType.ArenaDefense; |
| | | Refresh(); |
| | | }); |
| | | } |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | heroListScroller.OnRefreshCell += OnRefreshCell; |
| | | CreateScroller(); |
| | | Refresh(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | heroListScroller.OnRefreshCell -= OnRefreshCell; |
| | | } |
| | | |
| | | |
| | | public override void Refresh() |
| | | { |
| | | OnBattleTeamAttrPer(); |
| | | RefreshOnTeamCountry(); |
| | | RefreshOnTeamBtn(); |
| | | } |
| | | |
| | | |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell as HeroCardLineCell; |
| | | _cell.Display(cell.index); |
| | | } |
| | | |
| | | void CreateScroller() |
| | | { |
| | | heroListScroller.Refresh(); |
| | | for (int i = 0; i < HeroUIManager.Instance.heroSortList.Count; i++) |
| | | { |
| | | if (i % 4 == 0) |
| | | { |
| | | heroListScroller.AddCell(ScrollerDataType.Header, i); |
| | | } |
| | | } |
| | | heroListScroller.Restart(); |
| | | } |
| | | |
| | | //上阵加成 |
| | | void OnBattleTeamAttrPer() |
| | | { |
| | | var valuePer = 0; |
| | | var team = TeamManager.Instance.GetTeam(HeroUIManager.Instance.selectTeamType); |
| | | if (team != null) |
| | | { |
| | | for (int i = 0; i < team.serverData.Length; i++) |
| | | { |
| | | var hero = HeroManager.Instance.GetHero(team.serverData[i].guid); |
| | | if (hero != null) |
| | | { |
| | | valuePer += hero.GetOnBattleAddPer(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | //上阵属性 |
| | | for (int i = 0; i < attrOnList.Length; i++) |
| | | { |
| | | attrOnList[i].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.basePerAttrs[i], valuePer)); |
| | | } |
| | | } |
| | | |
| | | //上阵武将国家光环激活 |
| | | void RefreshOnTeamCountry() |
| | | { |
| | | Int2 result = HeroUIManager.Instance.GetMaxCountHeroCountry(HeroUIManager.Instance.selectTeamType); |
| | | |
| | | var config = HeroLineupHaloConfig.GetConfig(result.x, result.y); |
| | | if (config == null) |
| | | { |
| | | countryOnImg.SetSprite("heroTeamCountry" + result.x); |
| | | for (int i = 0; i < OnCountImgs.Count; i++) |
| | | { |
| | | OnCountImgs[i].SetActive(false); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | countryOnImg.SetSprite("heroTeamCountry" + result.x); |
| | | for (int i = 0; i < OnCountImgs.Count; i++) |
| | | { |
| | | if (i < result.y) |
| | | { |
| | | OnCountImgs[i].SetActive(true); |
| | | OnCountImgs[i].SetSprite("heroTeamCountryPoint" + result.x); |
| | | } |
| | | else |
| | | { |
| | | OnCountImgs[i].SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | //管理布阵入口按钮:如竞技场是否根据功能显隐,通天塔和主线只有进攻方布阵默认不显示 |
| | | void RefreshOnTeamBtn() |
| | | { |
| | | if (HeroUIManager.Instance.selectTeamType == TeamType.Arena || |
| | | HeroUIManager.Instance.selectTeamType == TeamType.ArenaDefense) |
| | | { |
| | | attackTeamBtn.SetActive(true); |
| | | defendTeamBtn.SetActive(true); |
| | | if (HeroUIManager.Instance.selectTeamType == TeamType.Arena) |
| | | { |
| | | attackTeamBtn.SelectBtn(true); |
| | | } |
| | | else |
| | | { |
| | | defendTeamBtn.SelectBtn(true); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | attackTeamBtn.SetActive(false); |
| | | defendTeamBtn.SetActive(false); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/System/HeroUI/HeroPosWin.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: c8849c7f1a741cc438948b5f03557325 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
New file |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | //布阵中的 武将角色 |
| | | public class HeroScenePosCell : MonoBehaviour |
| | | { |
| | | [SerializeField] Button heroBtn; |
| | | [SerializeField] Text jobTip; |
| | | [SerializeField] Text posTip; |
| | | [SerializeField] Image countryImg; |
| | | [SerializeField] Text nameText; |
| | | [SerializeField] Text lvText; |
| | | [SerializeField] UIHeroController heroModel; |
| | | [SerializeField] Image posCircleImg; |
| | | |
| | | public void Display(string guid) |
| | | { |
| | | var hero = HeroManager.Instance.GetHero(guid); |
| | | |
| | | lvText.text = Language.Get("L1094") + hero.heroLevel.ToString(); |
| | | var heroConfig = hero.heroConfig; |
| | | countryImg.SetSprite("herocountry" + heroConfig.Country); |
| | | heroModel.Create(heroConfig.SkinIDList[hero.SkinIndex], heroConfig.UIScale); |
| | | |
| | | |
| | | nameText.text = hero.breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, hero.breakLevel); |
| | | |
| | | } |
| | | } |
| | | |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/System/HeroUI/HeroScenePosCell.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 5568cf8758fcecf45ac471d4b4bbd6fe |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | //武将筛选 |
| | | public class HeroSelectBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] Transform unFoldForm; //展开后的容器 |
| | | [SerializeField] Button foldBtn; //收起按钮 |
| | | [SerializeField] Transform foldForm; //收起容器 |
| | | [SerializeField] Button unFoldBtn; //展开按钮 |
| | | [SerializeField] GroupButtonEx[] jobsBtn; |
| | | [SerializeField] GroupButtonEx[] countrysBtn; |
| | | [SerializeField] GroupButtonExManager jobManager; |
| | | [SerializeField] GroupButtonExManager countryManager; |
| | | |
| | | int m_Job = 0; |
| | | int m_Country = 0; |
| | | int foldState = 0; //0 收起,1 展开 |
| | | |
| | | //点击按钮需通知响应外部事件 |
| | | public Action<int, int> selectAction; |
| | | |
| | | |
| | | |
| | | |
| | | void Awake() |
| | | { |
| | | foldBtn.AddListener(() => |
| | | { |
| | | foldState = 0; |
| | | RefreshFolState(); |
| | | }); |
| | | unFoldBtn.AddListener(() => |
| | | { |
| | | foldState = 1; |
| | | RefreshFolState(); |
| | | }); |
| | | |
| | | for (int i = 0; i < jobsBtn.Length; i++) |
| | | { |
| | | int index = i; |
| | | jobsBtn[i].AddListener(() => |
| | | { |
| | | m_Job = index; |
| | | RefreshJobsBtn(); |
| | | selectAction?.Invoke(m_Job, m_Country); |
| | | }); |
| | | } |
| | | |
| | | for (int i = 0; i < countrysBtn.Length; i++) |
| | | { |
| | | int index = i; |
| | | countrysBtn[i].AddListener(() => |
| | | { |
| | | m_Country = index; |
| | | RefreshCountryBtn(); |
| | | selectAction?.Invoke(m_Job, m_Country); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void Display(int state, int job, int country, Action<int, int> onRefresh) |
| | | { |
| | | foldState = state; |
| | | m_Job = job; |
| | | m_Country = country; |
| | | |
| | | RefreshFolState(); |
| | | RefreshJobsBtn(); |
| | | RefreshCountryBtn(); |
| | | selectAction = onRefresh; |
| | | |
| | | } |
| | | |
| | | |
| | | //刷新全部分类 |
| | | void RefreshJobsBtn() |
| | | { |
| | | jobManager.SelectButton(jobsBtn[m_Job]); |
| | | } |
| | | //刷新全部分类 |
| | | void RefreshCountryBtn() |
| | | { |
| | | countryManager.SelectButton(countrysBtn[m_Country]); |
| | | } |
| | | //刷新展开收起状态 |
| | | void RefreshFolState() |
| | | { |
| | | unFoldBtn.SetActive(foldState == 1); |
| | | foldBtn.SetActive(foldState == 0); |
| | | } |
| | | } |
| | | |
copy from Main/Utility/GameObjectPool.cs.meta
copy to Main/System/HeroUI/HeroSelectBehaviour.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99e41fbb2b3832c41b1575b72c946cca |
| | | timeCreated: 1504310243 |
| | | licenseType: Pro |
| | | guid: 81701dbe94ee5914c97bbc39aa5a418f |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | |
| | | |
| | | using UnityEngine; |
| | | |
| | | //武将相关界面的操作数据管理 |
| | | public class HeroUIManager : GameSystemManager<HeroUIManager> |
| | | { |
| | | //武将列表界面 |
| | | public List<string> heroSortList { get; private set; } = new List<string>(); //上阵为主线的列表 |
| | | |
| | | public List<string> heroOnTeamSortList { get; private set; } = new List<string>(); //不同上阵的列表排序 |
| | | |
| | | public TeamType selectTeamType = TeamType.Story; //当前选中的是哪个阵容, 布阵相关逻辑使用 |
| | | |
| | | public void OnBeforePlayerDataInitialize() |
| | | { |
| | | |
| | | heroSortList.Clear(); |
| | | heroOnTeamSortList.Clear(); |
| | | } |
| | | |
| | | public void OnPlayerLoginOk() |
| | |
| | | |
| | | } |
| | | |
| | | void ParseConfig() |
| | | public bool waitResortHeroList = false; |
| | | |
| | | |
| | | //刷新时机, 打开武将界面 或者 关闭功能界面 |
| | | public void SortHeroList() |
| | | { |
| | | heroSortList = HeroManager.Instance.GetHeroGuidList(); |
| | | heroSortList.Sort(CmpHero); |
| | | } |
| | | |
| | | |
| | | int CmpHero(string guidA, string guidB) |
| | | { |
| | | HeroInfo heroA = HeroManager.Instance.GetHero(guidA); |
| | | HeroInfo heroB = HeroManager.Instance.GetHero(guidB); |
| | | if (heroA == null || heroB == null) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | // 排序规则:上阵>武将等级>突破等级>武将觉醒阶级>武将品质>武将吞噬星级>武将ID |
| | | bool isInTeamA = heroA.IsInTeamByTeamType(TeamType.Story); |
| | | bool isInTeamB = heroB.IsInTeamByTeamType(TeamType.Story); |
| | | if (isInTeamA != isInTeamB) |
| | | { |
| | | return isInTeamA ? -1 : 1; |
| | | } |
| | | if (heroA.heroLevel != heroB.heroLevel) |
| | | { |
| | | return heroA.heroLevel > heroB.heroLevel ? -1 : 1; |
| | | } |
| | | if (heroA.breakLevel != heroB.breakLevel) |
| | | { |
| | | return heroA.breakLevel > heroB.breakLevel ? -1 : 1; |
| | | } |
| | | if (heroA.awakeLevel != heroB.awakeLevel) |
| | | { |
| | | return heroA.awakeLevel > heroB.awakeLevel ? -1 : 1; |
| | | } |
| | | if (heroA.Quality != heroB.Quality) |
| | | { |
| | | return heroA.Quality > heroB.Quality ? -1 : 1; |
| | | } |
| | | if (heroA.heroStar != heroA.heroStar) |
| | | { |
| | | return heroA.heroStar > heroB.heroStar ? -1 : 1; |
| | | } |
| | | |
| | | return heroA.heroId.CompareTo(heroB.heroId); |
| | | } |
| | | |
| | | |
| | | public void SortHeroOnTeamList() |
| | | { |
| | | heroOnTeamSortList = HeroManager.Instance.GetHeroGuidList(); |
| | | heroOnTeamSortList.Sort(CmpHeroByTeamType); |
| | | } |
| | | |
| | | |
| | | int CmpHeroByTeamType(string guidA, string guidB) |
| | | { |
| | | HeroInfo heroA = HeroManager.Instance.GetHero(guidA); |
| | | HeroInfo heroB = HeroManager.Instance.GetHero(guidB); |
| | | if (heroA == null || heroB == null) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | // 排序规则:上阵>武将等级>突破等级>武将觉醒阶级>武将品质>武将吞噬星级>武将ID |
| | | bool isInTeamA = heroA.IsInTeamByTeamType(selectTeamType); |
| | | bool isInTeamB = heroB.IsInTeamByTeamType(selectTeamType); |
| | | if (isInTeamA != isInTeamB) |
| | | { |
| | | return isInTeamA ? -1 : 1; |
| | | } |
| | | if (heroA.heroLevel != heroB.heroLevel) |
| | | { |
| | | return heroA.heroLevel > heroB.heroLevel ? -1 : 1; |
| | | } |
| | | if (heroA.breakLevel != heroB.breakLevel) |
| | | { |
| | | return heroA.breakLevel > heroB.breakLevel ? -1 : 1; |
| | | } |
| | | if (heroA.awakeLevel != heroB.awakeLevel) |
| | | { |
| | | return heroA.awakeLevel > heroB.awakeLevel ? -1 : 1; |
| | | } |
| | | if (heroA.Quality != heroB.Quality) |
| | | { |
| | | return heroA.Quality > heroB.Quality ? -1 : 1; |
| | | } |
| | | if (heroA.heroStar != heroA.heroStar) |
| | | { |
| | | return heroA.heroStar > heroB.heroStar ? -1 : 1; |
| | | } |
| | | |
| | | return heroA.heroId.CompareTo(heroB.heroId); |
| | | } |
| | | |
| | | |
| | | |
| | | public void QueryUnLockHeroPack() |
| | | { |
| | | { |
| | | //解锁更多的武将背包 |
| | | } |
| | | |
| | | //上阵队伍中各个国家的武将数量 |
| | | public Dictionary<HeroCountry, int> GetCountryHeroCountByTeamType(TeamType teamType) |
| | | { |
| | | Dictionary<HeroCountry, int> heroCountryCount = new Dictionary<HeroCountry, int>(); |
| | | |
| | | var team = TeamManager.Instance.GetTeam(teamType); |
| | | if (team != null) |
| | | { |
| | | for (int i = 0; i < team.serverData.Length; i++) |
| | | { |
| | | var hero = HeroManager.Instance.GetHero(team.serverData[i].guid); |
| | | if (hero != null) |
| | | { |
| | | if (!heroCountryCount.ContainsKey(hero.heroCountry)) |
| | | { |
| | | heroCountryCount.Add(hero.heroCountry, 1); |
| | | } |
| | | else |
| | | { |
| | | heroCountryCount[hero.heroCountry] += 1; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | return heroCountryCount; |
| | | } |
| | | |
| | | //获得上阵中武将数量最大的国家和数量 |
| | | public Int2 GetMaxCountHeroCountry(TeamType teamType) |
| | | { |
| | | var countryCount = GetCountryHeroCountByTeamType(teamType); |
| | | //找到最大的国家和数量 |
| | | HeroCountry country = HeroCountry.None; |
| | | int maxValue = 0; |
| | | foreach (var data in countryCount) |
| | | { |
| | | if (data.Value > maxValue) |
| | | { |
| | | country = data.Key; |
| | | maxValue = data.Value; |
| | | } |
| | | } |
| | | return new Int2((int)country, maxValue); |
| | | } |
| | | |
| | | //AttackType 0 攻击阵容 1 防守阵容 |
| | | int GetSelectTeamTypeByAttackType(int AttackType) |
| | | { |
| | | if (selectTeamType == TeamType.Arena) |
| | | { |
| | | if (AttackType == 0) |
| | | { |
| | | return (int)TeamType.Arena; |
| | | } |
| | | else if (AttackType == 1) |
| | | { |
| | | return (int)TeamType.ArenaDefense; |
| | | } |
| | | } |
| | | else if (selectTeamType == TeamType.ArenaDefense) |
| | | { |
| | | if (AttackType == 0) |
| | | { |
| | | return (int)TeamType.ArenaDefense; |
| | | } |
| | | else if (AttackType == 1) |
| | | { |
| | | return (int)TeamType.Arena; |
| | | } |
| | | } |
| | | |
| | | return (int)TeamType.Story; |
| | | } |
| | | } |
| | |
| | | index = serverItem.ItemPlace;
|
| | | count = (int)serverItem.ItemCount;
|
| | | remainHour = (int)serverItem.RemainHour;
|
| | | userData = serverItem.UserData;
|
| | | guid = serverItem.ItemGUID;
|
| | | userData = serverItem.UserData.Trim().Replace("\0", "");
|
| | | guid = serverItem.ItemGUID.Trim().Replace("\0", "");
|
| | | isAuction = serverItem.IsBind;
|
| | | gearScore = (int)serverItem.GearScore;
|
| | | isLock = serverItem.IsLocked > 0;
|
| | |
| | | index = serverItem.ItemPlace;
|
| | | count = (int)serverItem.ItemCount;
|
| | | remainHour = (int)serverItem.RemainHour;
|
| | | userData = serverItem.UserData;
|
| | | guid = serverItem.ItemGUID;
|
| | | //字符串后面有空字符问题,经常会导致不可预料的bug
|
| | | userData = serverItem.UserData.Trim().Replace("\0", "");
|
| | | guid = serverItem.ItemGUID.Trim().Replace("\0", "");
|
| | | isAuction = serverItem.IsBind;
|
| | | gearScore = (int)serverItem.GearScore;
|
| | | isLock = serverItem.IsLocked > 0;
|
| | |
| | | [SerializeField] Text taskNumText; |
| | | [SerializeField] Image awardIcon; |
| | | [SerializeField] Text awardCnt; |
| | | [SerializeField] EffectPlayer taskEffect; |
| | | [SerializeField] UIEffectPlayer taskEffect; |
| | | |
| | | |
| | | //关卡 |
| | |
| | | TaskManager.Instance.OnTaskUpdate += UpdateTask; |
| | | Refresh(); |
| | | UIManager.Instance.OpenWindow<BattleWin>(); |
| | | |
| | | taskEffect.effectId = Random.Range(1007, 1008); |
| | | taskEffect.Play(); |
| | | } |
| | | protected override void OnOpen() |
| | | { |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | /// <summary> |
| | | /// 延迟几秒执行事件 |
| | | /// </summary> |
| | | public class WaitCallBack : MonoBehaviour |
| | | { |
| | | internal float waitTime = 2.0f; |
| | | |
| | | public bool doOnAwake = false; |
| | | /// <summary> |
| | | /// 延迟几秒执行事件 |
| | | /// 时间到达回调 |
| | | /// </summary> |
| | | public class WaitCallBack : MonoBehaviour |
| | | public Action<Component> OnCompelete; |
| | | /// <summary> |
| | | /// 每帧回调 |
| | | /// </summary> |
| | | public Action<Component> OnWait; |
| | | |
| | | internal static Dictionary<GameObject, WaitCallBack> waitDic = new Dictionary<GameObject, WaitCallBack>(); |
| | | |
| | | private float m_Time = 0; |
| | | |
| | | private bool start = false; |
| | | |
| | | private Component m_Comp; |
| | | |
| | | private void Awake() |
| | | { |
| | | internal float waitTime = 2.0f; |
| | | |
| | | public bool doOnAwake = false; |
| | | /// <summary> |
| | | /// 时间到达回调 |
| | | /// </summary> |
| | | public Action<Component> OnCompelete; |
| | | /// <summary> |
| | | /// 每帧回调 |
| | | /// </summary> |
| | | public Action<Component> OnWait; |
| | | |
| | | internal static Dictionary<GameObject, WaitCallBack> waitDic = new Dictionary<GameObject, WaitCallBack>(); |
| | | |
| | | private float m_Time = 0; |
| | | |
| | | private bool start = false; |
| | | |
| | | private Component m_Comp; |
| | | |
| | | private void Awake() |
| | | if (doOnAwake) |
| | | { |
| | | if (doOnAwake) |
| | | { |
| | | Play(); |
| | | } |
| | | } |
| | | |
| | | private void OnDisable() |
| | | { |
| | | Stop(); |
| | | } |
| | | |
| | | private void Update() |
| | | { |
| | | if (start) |
| | | { |
| | | m_Time += Time.deltaTime; |
| | | if (m_Time >= waitTime) |
| | | { |
| | | Stop(); |
| | | if (OnCompelete != null) |
| | | OnCompelete(m_Comp); |
| | | } |
| | | if (OnWait != null && start) |
| | | OnWait(m_Comp); |
| | | } |
| | | } |
| | | |
| | | internal void Play() |
| | | { |
| | | start = true; |
| | | } |
| | | |
| | | internal void Restart() |
| | | { |
| | | m_Time = 0; |
| | | Play(); |
| | | } |
| | | |
| | | internal void Stop() |
| | | { |
| | | m_Time = 0; |
| | | start = false; |
| | | } |
| | | |
| | | internal void Pause() |
| | | { |
| | | start = false; |
| | | } |
| | | |
| | | private void OnDestroy() |
| | | { |
| | | if (waitDic.ContainsKey(gameObject)) |
| | | { |
| | | waitDic.Remove(gameObject); |
| | | } |
| | | } |
| | | |
| | | internal void AddWaitDic(Component go) |
| | | { |
| | | m_Comp = go; |
| | | waitDic.Add(go.gameObject, this); |
| | | } |
| | | } |
| | | |
| | | public static class Helper |
| | | private void OnDisable() |
| | | { |
| | | public static void DoWaitStart(this Component go) |
| | | { |
| | | if (GetWait(go) == null) |
| | | return; |
| | | GetWait(go).Play(); |
| | | } |
| | | Stop(); |
| | | } |
| | | |
| | | public static void OnWaitCompelete(this Component go, Action<Component> func) |
| | | private void Update() |
| | | { |
| | | if (start) |
| | | { |
| | | WaitCallBack wait = GetWait(go); |
| | | if (wait == null) |
| | | return; |
| | | wait.OnCompelete = func; |
| | | } |
| | | |
| | | public static void OnWait(this Component go, Action<Component> func) |
| | | { |
| | | WaitCallBack wait = GetWait(go); |
| | | if (wait == null) |
| | | return; |
| | | wait.OnWait = func; |
| | | } |
| | | |
| | | public static void DoWaitRestart(this Component go) |
| | | { |
| | | if (GetWait(go) == null) |
| | | return; |
| | | GetWait(go).Restart(); |
| | | } |
| | | |
| | | public static void DoWaitStop(this Component go) |
| | | { |
| | | if (GetWait(go) == null) |
| | | return; |
| | | GetWait(go).Stop(); |
| | | } |
| | | |
| | | public static void DoWaitPause(this Component go) |
| | | { |
| | | if (GetWait(go) == null) |
| | | return; |
| | | GetWait(go).Pause(); |
| | | } |
| | | |
| | | public static WaitCallBack GetWait(Component go) |
| | | { |
| | | WaitCallBack wait = null; |
| | | if (go == null) |
| | | return null; |
| | | WaitCallBack.waitDic.TryGetValue(go.gameObject, out wait); |
| | | if (wait == null) |
| | | m_Time += Time.deltaTime; |
| | | if (m_Time >= waitTime) |
| | | { |
| | | wait = go.GetComponent<WaitCallBack>(); |
| | | if (wait == null) |
| | | { |
| | | wait = go.gameObject.AddComponent<WaitCallBack>(); |
| | | } |
| | | wait.AddWaitDic(go); |
| | | Stop(); |
| | | if (OnCompelete != null) |
| | | OnCompelete(m_Comp); |
| | | } |
| | | return wait; |
| | | } |
| | | |
| | | public static void SetWait(this Component comp, float time) |
| | | { |
| | | WaitCallBack wait = GetWait(comp); |
| | | if (wait != null) |
| | | { |
| | | wait.waitTime = time; |
| | | } |
| | | if (OnWait != null && start) |
| | | OnWait(m_Comp); |
| | | } |
| | | } |
| | | |
| | | internal void Play() |
| | | { |
| | | start = true; |
| | | } |
| | | |
| | | internal void Restart() |
| | | { |
| | | m_Time = 0; |
| | | Play(); |
| | | } |
| | | |
| | | internal void Stop() |
| | | { |
| | | m_Time = 0; |
| | | start = false; |
| | | } |
| | | |
| | | internal void Pause() |
| | | { |
| | | start = false; |
| | | } |
| | | |
| | | private void OnDestroy() |
| | | { |
| | | if (waitDic.ContainsKey(gameObject)) |
| | | { |
| | | waitDic.Remove(gameObject); |
| | | } |
| | | } |
| | | |
| | | internal void AddWaitDic(Component go) |
| | | { |
| | | m_Comp = go; |
| | | waitDic.Add(go.gameObject, this); |
| | | } |
| | | } |
| | | |
| | | public static class Helper |
| | | { |
| | | public static void DoWaitStart(this Component go) |
| | | { |
| | | if (GetWait(go) == null) |
| | | return; |
| | | GetWait(go).Play(); |
| | | } |
| | | |
| | | public static void OnWaitCompelete(this Component go, Action<Component> func) |
| | | { |
| | | WaitCallBack wait = GetWait(go); |
| | | if (wait == null) |
| | | return; |
| | | wait.OnCompelete = func; |
| | | } |
| | | |
| | | public static void OnWait(this Component go, Action<Component> func) |
| | | { |
| | | WaitCallBack wait = GetWait(go); |
| | | if (wait == null) |
| | | return; |
| | | wait.OnWait = func; |
| | | } |
| | | |
| | | public static void DoWaitRestart(this Component go) |
| | | { |
| | | if (GetWait(go) == null) |
| | | return; |
| | | GetWait(go).Restart(); |
| | | } |
| | | |
| | | public static void DoWaitStop(this Component go) |
| | | { |
| | | if (GetWait(go) == null) |
| | | return; |
| | | GetWait(go).Stop(); |
| | | } |
| | | |
| | | public static void DoWaitPause(this Component go) |
| | | { |
| | | if (GetWait(go) == null) |
| | | return; |
| | | GetWait(go).Pause(); |
| | | } |
| | | |
| | | public static WaitCallBack GetWait(Component go) |
| | | { |
| | | WaitCallBack wait = null; |
| | | if (go == null) |
| | | return null; |
| | | WaitCallBack.waitDic.TryGetValue(go.gameObject, out wait); |
| | | if (wait == null) |
| | | { |
| | | wait = go.GetComponent<WaitCallBack>(); |
| | | if (wait == null) |
| | | { |
| | | wait = go.gameObject.AddComponent<WaitCallBack>(); |
| | | } |
| | | wait.AddWaitDic(go); |
| | | } |
| | | return wait; |
| | | } |
| | | |
| | | public static void SetWait(this Component comp, float time) |
| | | { |
| | | WaitCallBack wait = GetWait(comp); |
| | | if (wait != null) |
| | | { |
| | | wait.waitTime = time; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | }
|
| | | }
|
| | |
|
| | | EffectPlayer m_AvatarUIEffect;
|
| | | private EffectPlayer avatarUIEffect
|
| | | UIEffectPlayer m_AvatarUIEffect;
|
| | | private UIEffectPlayer avatarUIEffect
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_AvatarUIEffect == null)
|
| | | {
|
| | | m_AvatarUIEffect = this.GetComponent<EffectPlayer>("AvatarCell/Img_Avatar");
|
| | | m_AvatarUIEffect = this.GetComponent<UIEffectPlayer>("AvatarCell/Img_Avatar");
|
| | | }
|
| | | return m_AvatarUIEffect;
|
| | | }
|
| | | }
|
| | |
|
| | | EffectPlayer m_AvatarFrameUIEffect;
|
| | | private EffectPlayer avatarFrameUIEffect
|
| | | UIEffectPlayer m_AvatarFrameUIEffect;
|
| | | private UIEffectPlayer avatarFrameUIEffect
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_AvatarFrameUIEffect == null)
|
| | | {
|
| | | m_AvatarFrameUIEffect = this.GetComponent<EffectPlayer>("AvatarCell/Img_AvatarFrame");
|
| | | m_AvatarFrameUIEffect = this.GetComponent<UIEffectPlayer>("AvatarCell/Img_AvatarFrame");
|
| | | }
|
| | | return m_AvatarFrameUIEffect;
|
| | | }
|
| | |
| | | { |
| | | // 英雄当前所有在的队伍 |
| | | List<int> heroTeams = heroInfo.itemHero.GetUseData(81); |
| | | if (heroTeams == null || heroTeams.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | Dictionary<TeamType, KeyValuePair<int, int>> teamTypeShapeTypePositionDict = new Dictionary<TeamType, KeyValuePair<int, int>>(); |
| | | foreach (var teamMsg in heroTeams) |
| | |
| | | |
| | | if (!teamDict.TryGetValue(teamType, out team)) |
| | | { |
| | | team = new TeamBase(teamType); |
| | | team.CreateDefault(HeroManager.Instance.GetPowerfulHeroList()); |
| | | teamDict.Add(teamType, team); |
| | | // 测试用 |
| | | // team = new TeamBase(teamType); |
| | | // team.CreateDefault(HeroManager.Instance.GetPowerfulHeroList()); |
| | | // teamDict.Add(teamType, team); |
| | | } |
| | | |
| | | return team; |
| | |
| | | |
| | | |
| | | //与服务端的约定 对应函数GetSelectTeamTypeByAttackType |
| | | public enum TeamType |
| | | { |
| | | None = 0, |
| | | // PVE |
| | | Story = 1, |
| | | |
| | | // PVP 进攻 |
| | | Arena = 21, |
| | | // PVP 防守 |
| | | ArenaDefense = 22, |
| | | Tower = 3, |
| | | } |
| | | |
| | | // PVP |
| | | Arena = 101, |
| | | } |
| | |
| | | [SerializeField] RichText marqueeText; |
| | | [SerializeField] RectTransform marqueeBg; |
| | | [SerializeField] TweenCurve tweenCurve; |
| | | [SerializeField] EffectPlayer m_Effect; |
| | | [SerializeField] UIEffectPlayer m_Effect; |
| | | |
| | | Vector3 fromPos; |
| | | Vector3 toPos; |
| | |
| | | /// <summary> |
| | | /// 播放UI特效 |
| | | /// </summary> |
| | | /// <param name="effectName">特效资源名称</param> |
| | | /// <param name="id">特效资源名称</param> |
| | | /// <param name="parent">特效父节点,默认为当前UI</param> |
| | | /// <param name="autoDestroy">是否自动销毁,默认为true</param> |
| | | /// <param name="destroyDelay">自动销毁延迟时间,默认为5秒</param> |
| | | /// <returns>特效游戏对象</returns> |
| | | public EffectPlayer PlayUIEffect(int id, Transform parent = null) |
| | | public UIEffectPlayer PlayUIEffect(int id, Transform parent = null) |
| | | { |
| | | // 使用默认值 |
| | | if (parent == null) parent = transform; |
| | | |
| | | return EffectPlayer.Create(id, parent, false); |
| | | return UIEffectPlayer.CreateEffect(id, parent, false); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | |
| | | public enum TitleBtnState |
| | | { |
| | | Normal, |
| | | Click, |
| | | Normal, //非点击状态 |
| | | Click, //点击后状态 |
| | | Locked, |
| | | } |
| | | |