0312 去掉表默认的多线程引用,小游戏不支持多线程;特效分离出UI特效;增加按钮组的控制;特效增加池管理
98个文件已修改
1个文件已删除
13 文件已复制
14个文件已添加
1 文件已重命名
2498 ■■■■ 已修改文件
Main/Component/UI/Common/FunctionButton.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/FunctionButtonGroup.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/GroupButtonEx.cs 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/GroupButtonEx.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/GroupButtonExManager.cs 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/GroupButtonExManager.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/ItemBaseEffect.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Effect/EffectMgr.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Effect/EffectPlayer.cs 263 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Effect/EffectTime.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Effect/EffectTime.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Effect/UIEffectPlayer.cs 154 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Effect/UIEffectPlayer.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/ConfigManager.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/AppointItemConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/AudioConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/CTGConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/CTGSelectItemConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/ChatBubbleBoxConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/ChestsAwardConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/ChestsConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/DailyLivenessRewardConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/DailyQuestConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/DailyQuestOpenTimeConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/DienstgradConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/DirtyNameConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/DirtyWordConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/EffectConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/EmojiPackConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/EquipGSParamConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/EquipPlaceMapConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/FaceConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/FamilyConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/FamilyEmblemConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/FirstGoldConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/FrameAnimationConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/FuncConfigConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/FuncOpenLVConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/FunctionTeamSetConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/GetItemWaysConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/GmCmdConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/GuideConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroAwakeConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroBreakConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroFetterConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroLineupHaloConfig.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroLineupHaloConfig.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroQualityAwakeConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroQualityBreakConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroQualityConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroQualityLVConfig.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroQualityLVConfig.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroSkinConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/HeroTalentConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/IconConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/InitialFunctionConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/ItemConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/KickOutReasonConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/LanguageConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/MailConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/MainChapterConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/MainLevelConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/NPCConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/NPCExConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/NPCLineupConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/OrderInfoConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/PlayerFaceConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/PlayerFacePicConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/PlayerFacePicStarConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/PlayerFaceStarConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/PlayerLVConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/PlayerPropertyConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/PriorLanguageConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/RealmConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/RealmLVUPTaskConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/RichTextMsgReplaceConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/RuleConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/SkillConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/StoreConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/SuccessConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/SysInfoConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/TaskConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/TitleStarUpConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/TreasureCntAwardConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/TreasureItemLibConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/TreasureSetConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/TreeLVConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/XBGetItemConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/priorbundleConfig.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/HeroLineupHaloConfig.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/HeroLineupHaloConfig.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/PlayerPropertyConfig.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/ResModule/GameObjectPoolManager.cs 236 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroInfo.Properties.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroInfo.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/HeroManager.cs 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Hero/UIHeroController.cs 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroCardCell.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroCardLineCell.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroConnectionCell.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroConnectionCell.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroConnectionHeadCell.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroConnectionHeadCell.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroHeadBaseCell.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroListWin.cs 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroPosHeadCell.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroPosHeadCell.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroPosLineCell.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroPosLineCell.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroPosWin.cs 187 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroPosWin.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroScenePosCell.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroScenePosCell.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroSelectBehaviour.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroSelectBehaviour.cs.meta 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/HeroUI/HeroUIManager.cs 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/KnapSack/Logic/ItemModel.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/HomeWin.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Message/WaitCallBack.cs 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/AvatarCell.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Team/TeamManager.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Team/TeamType.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Tip/MarqueeWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/UIBase/UIBase.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/EnumHelper.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/GameObjectPool.cs 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/FunctionButton.cs
@@ -11,7 +11,7 @@
using System;
//关联游戏玩法功能按钮,如升星功能
    public class FunctionButton : Button
    {
        [SerializeField] int m_Order = 0;
Main/Component/UI/Common/FunctionButtonGroup.cs
@@ -9,13 +9,16 @@
using UnityEngine.Events;
using System;
//关联游戏玩法功能按钮,如升星功能
    public class FunctionButtonGroup : MonoBehaviour
    {
        [SerializeField] ScrollRect m_ScrollRect;
        [SerializeField] RectTransform m_Container;
        public int unLockedCount {
            get {
    public int unLockedCount
    {
        get
        {
                var count = 0;
                foreach (var button in functionButtons.Values)
                {
Main/Component/UI/Common/GroupButtonEx.cs
New file
@@ -0,0 +1,151 @@
//--------------------------------------------------------
//    [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();
            }
        }
    }
}
Main/Component/UI/Common/GroupButtonEx.cs.meta
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
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 97eda1b97c0fe374f9197d882712f299
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/Component/UI/Common/GroupButtonExManager.cs
New file
@@ -0,0 +1,152 @@
//--------------------------------------------------------
//    [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;
    }
}
Main/Component/UI/Common/GroupButtonExManager.cs.meta
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
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 25d1a287b0e773443a2231ff104728ad
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/Component/UI/Common/ItemBaseEffect.cs
@@ -3,7 +3,7 @@
using UnityEngine;
public class ItemBaseEffect : MonoBehaviour
{
    [SerializeField] EffectPlayer m_SuitEffect;
    [SerializeField] UIEffectPlayer m_SuitEffect;
    
    int itemId = 0;
Main/Component/UI/Effect/EffectMgr.cs
@@ -1,11 +1,10 @@
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)
@@ -23,28 +22,5 @@
        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);
    //     }
    // }
}
Main/Component/UI/Effect/EffectPlayer.cs
@@ -6,24 +6,43 @@
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;
@@ -42,150 +61,135 @@
    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)
            {
                this.gameObject.SetActive(true);
            }
                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");
            this.gameObject.SetActive(true);
        }
        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;
            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;
            }
        // 外层控制具体播放哪个动画
        spineComp.enabled = true;
            
            return;
        }
        //加载unity特效
    protected virtual void PlayerEffect(bool playSpine)
    {
        var effectPrefab = ResManager.Instance.LoadAsset<GameObject>("UIEffect/" + effectConfig.packageName, effectConfig.fxName);
        if (effectPrefab == null)
        {
@@ -193,20 +197,43 @@
            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}";
        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>();
@@ -215,12 +242,6 @@
        if (canvas != null)
        {
            blocker.SetParentCanvas(canvas);
        }
        // 自动销毁
        if (effectConfig.autoDestroy != 0)
        {
            Destroy(effectTarget, effectConfig.destroyDelay);
        }
    }
@@ -232,33 +253,51 @@
            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)
        if (isReleaseImmediately)
                {
                    spineComp.enabled = false;
            Stop();
                }
            }
            onComplete?.Invoke();
    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)
@@ -270,11 +309,23 @@
        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()
    {
@@ -372,4 +423,6 @@
            return;
        }
    }
}
Main/Component/UI/Effect/EffectTime.cs
New file
@@ -0,0 +1,13 @@
using System.Runtime.CompilerServices;
using UnityEngine;
//设置特效播放时间 和 循环,方便代码调用,不用去判断特效内部情况,可以把这个文件给外包
public class EffectTime : MonoBehaviour
{
    //播放时长
    [Header("单次播放总时长")]
    public float playTime = 1f;
    [Header("是否循环特效")]
    public bool isLoop = false;
}
Main/Component/UI/Effect/EffectTime.cs.meta
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
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: f9909a1ae22dbb74099685649d44aa29
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/Component/UI/Effect/UIEffectPlayer.cs
New file
@@ -0,0 +1,154 @@
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;
    }
}
Main/Component/UI/Effect/UIEffectPlayer.cs.meta
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
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: d2a4fa811bba97941bd8ed92c750e271
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/Config/ConfigManager.cs
@@ -58,9 +58,11 @@
            typeof(GmCmdConfig),
            typeof(HeroAwakeConfig),
            typeof(HeroConfig),
            typeof(HeroLineupHaloConfig),
            typeof(HeroQualityAwakeConfig),
            typeof(HeroQualityBreakConfig),
            typeof(HeroQualityConfig),
            typeof(HeroQualityLVConfig),
            typeof(HeroSkinConfig),
            typeof(ItemConfig),
            typeof(KickOutReasonConfig),
@@ -273,12 +275,16 @@
        ClearConfigDictionary<HeroAwakeConfig>();
        // 清空 HeroConfig 字典
        ClearConfigDictionary<HeroConfig>();
        // 清空 HeroLineupHaloConfig 字典
        ClearConfigDictionary<HeroLineupHaloConfig>();
        // 清空 HeroQualityAwakeConfig 字典
        ClearConfigDictionary<HeroQualityAwakeConfig>();
        // 清空 HeroQualityBreakConfig 字典
        ClearConfigDictionary<HeroQualityBreakConfig>();
        // 清空 HeroQualityConfig 字典
        ClearConfigDictionary<HeroQualityConfig>();
        // 清空 HeroQualityLVConfig 字典
        ClearConfigDictionary<HeroQualityLVConfig>();
        // 清空 HeroSkinConfig 字典
        ClearConfigDictionary<HeroSkinConfig>();
        // 清空 ItemConfig 字典
Main/Config/Configs/AppointItemConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/AudioConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/CTGConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/CTGSelectItemConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/ChatBubbleBoxConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/ChestsAwardConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/ChestsConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/DailyLivenessRewardConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/DailyQuestConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/DailyQuestOpenTimeConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/DienstgradConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/DirtyNameConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/DirtyWordConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/EffectConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年7月22日
//    [  Date ]:           2025年7月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
Main/Config/Configs/EmojiPackConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/EquipGSParamConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/EquipPlaceMapConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/FaceConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年7月7日
//    [  Date ]:           2025年7月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
Main/Config/Configs/FamilyConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/FamilyEmblemConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/FirstGoldConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/FrameAnimationConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年6月30日
//    [  Date ]:           2025年7月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
Main/Config/Configs/FuncConfigConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/FuncOpenLVConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/FunctionTeamSetConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/GetItemWaysConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/GmCmdConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/GuideConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroAwakeConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroBreakConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroFetterConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroLineupHaloConfig.cs
New file
@@ -0,0 +1,69 @@
//--------------------------------------------------------
//    [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);
        }
    }
}
Main/Config/Configs/HeroLineupHaloConfig.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/Config/Configs/HeroLineupHaloConfig.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 8226332450e068a418446db4aab9cb01
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/Config/Configs/HeroQualityAwakeConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroQualityBreakConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroQualityConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroQualityLVConfig.cs
New file
@@ -0,0 +1,54 @@
//--------------------------------------------------------
//    [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);
        }
    }
}
Main/Config/Configs/HeroQualityLVConfig.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/Config/Configs/HeroQualityLVConfig.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: b0e2a9b5d4828284eb6dad12646b416c
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/Config/Configs/HeroSkinConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/HeroTalentConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/IconConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/InitialFunctionConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/ItemConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/KickOutReasonConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/LanguageConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/MailConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/MainChapterConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年7月7日
//    [  Date ]:           2025年7月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
Main/Config/Configs/MainLevelConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年7月7日
//    [  Date ]:           2025年7月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
Main/Config/Configs/NPCConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/NPCExConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/NPCLineupConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年7月7日
//    [  Date ]:           2025年7月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
Main/Config/Configs/OrderInfoConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/PlayerFaceConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/PlayerFacePicConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/PlayerFacePicStarConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/PlayerFaceStarConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/PlayerLVConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/PlayerPropertyConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/PriorLanguageConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/RealmConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/RealmLVUPTaskConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/RichTextMsgReplaceConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/RuleConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/SkillConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年7月17日
//    [  Date ]:           2025年7月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
Main/Config/Configs/StoreConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/SuccessConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/SysInfoConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/TaskConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/TitleStarUpConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/TreasureCntAwardConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/TreasureItemLibConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/TreasureSetConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/TreeLVConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年7月7日
//    [  Date ]:           2025年7月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
Main/Config/Configs/XBGetItemConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/Configs/priorbundleConfig.cs
@@ -1,11 +1,9 @@
//--------------------------------------------------------
//    [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;
Main/Config/PartialConfigs/HeroLineupHaloConfig.cs
New file
@@ -0,0 +1,35 @@
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];
    }
}
Main/Config/PartialConfigs/HeroLineupHaloConfig.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/Config/PartialConfigs/HeroLineupHaloConfig.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 7c4414e0cc0a8594a86f1c6dda522acb
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/Config/PartialConfigs/PlayerPropertyConfig.cs
@@ -9,7 +9,7 @@
    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;
Main/Core/ResModule/GameObjectPoolManager.cs
@@ -1,20 +1,103 @@
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>();
@@ -37,12 +120,40 @@
            dontDestoryGoInstIDList = new List<int>();
        }
#if UNITY_EDITOR
        if (m_DebugInstIDDict == null)
        {
            m_DebugInstIDDict = new Dictionary<int, DebugItem>();
        // 启动定期检查池的协程
        CheckPoolUsage();
        }
#endif
    private async UniTask CheckPoolUsage()
    {
        while (true)
        {
            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;
            }
        }
    }
    public void AddDontDestroyGoInstID(int id)
@@ -68,12 +179,26 @@
        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();
@@ -108,8 +233,16 @@
            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)
@@ -148,15 +281,11 @@
        }
        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;
@@ -168,14 +297,6 @@
            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)
@@ -199,17 +320,12 @@
                _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)
@@ -230,13 +346,16 @@
                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;
                }
            }
@@ -245,19 +364,17 @@
                _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)
        {
@@ -269,19 +386,15 @@
            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
@@ -289,6 +402,9 @@
            {
                releaseCallBack(go);
            }
            // 更新池统计数据
            Instance.UpdatePoolStats();
        }
        public void ReleaseAll()
@@ -302,13 +418,6 @@
                    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);
@@ -317,6 +426,9 @@
                
            }
            m_ActiveHashSet.Clear();
            // 更新池统计数据
            Instance.UpdatePoolStats();
        }
        public void Clear()
@@ -335,7 +447,7 @@
                
            }
#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);
@@ -354,10 +466,10 @@
            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);
@@ -367,9 +479,7 @@
            if (IsEmpty())
            {
                m_Prefab = null;
#if UNITY_EDITOR && !UNITY_ANDROID && !UNITY_IOS
                Destroy(m_DebugContainer.gameObject);
#endif
            }
            if (!string.IsNullOrEmpty(assetBundleName) && !string.IsNullOrEmpty(assetName))
Main/System/Hero/HeroInfo.Properties.cs
@@ -173,7 +173,7 @@
    //上阵属性:攻防血
    public int GetGoBattleAddPer()
    public int GetOnBattleAddPer()
    { 
        return qualityConfig.InitAddPer + qualityConfig.LVAddPer * heroLevel + qualityConfig.BreakLVAddPer * breakLevel + qualityConfig.StarAddPer * heroStar;
    }
Main/System/Hero/HeroInfo.cs
@@ -21,25 +21,6 @@
    }
    //是否主线上阵 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
@@ -140,4 +121,19 @@
    {
        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;
    }
}
Main/System/Hero/HeroManager.cs
@@ -10,8 +10,7 @@
    //初始创建(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;
@@ -41,7 +40,7 @@
    void OnBeforePlayerDataInitialize()
    {
        heroSortList.Clear();
        heroInfoDict.Clear();
    }
@@ -92,6 +91,11 @@
        return heroInfoDict.Values.ToList();
    }
    public List<string> GetHeroGuidList()
    {
        return heroInfoDict.Keys.ToList();
    }
    public List<HeroInfo> GetPowerfulHeroList()
    {
        List<HeroInfo> heroList = new List<HeroInfo>(heroInfoDict.Values);
@@ -119,52 +123,8 @@
        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);
    }
}
Main/System/Hero/UIHeroController.cs
@@ -6,17 +6,42 @@
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");
@@ -24,32 +49,32 @@
        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()
    {
        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>
Main/System/HeroUI/HeroCardCell.cs
@@ -21,7 +21,7 @@
    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);
@@ -39,7 +39,7 @@
        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;
Main/System/HeroUI/HeroCardLineCell.cs
@@ -1,15 +1,14 @@
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);
Main/System/HeroUI/HeroConnectionCell.cs
New file
@@ -0,0 +1,15 @@
using UnityEngine;
using UnityEngine.UI;
//羁绊模块
public class HeroConnectionCell : MonoBehaviour
{
    [SerializeField] HeroConnectionHeadCell[] heros;
    [SerializeField] Text connAttrText;
    public void Display()
    {
    }
}
Main/System/HeroUI/HeroConnectionCell.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/System/HeroUI/HeroConnectionCell.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: d9e6754a2b2ddd242a8da5b215186a22
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/System/HeroUI/HeroConnectionHeadCell.cs
New file
@@ -0,0 +1,45 @@
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);
    }
}
Main/System/HeroUI/HeroConnectionHeadCell.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/System/HeroUI/HeroConnectionHeadCell.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 82e5125576855304da53130b59ab10c3
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/System/HeroUI/HeroHeadBaseCell.cs
@@ -154,6 +154,7 @@
        var sprite = UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(skinID).SquareIcon);
        if (sprite == null)
        {
            // 内网未配置时
            heroIcon.SetSprite("herohead_default");
        }
        else
Main/System/HeroUI/HeroListWin.cs
@@ -16,33 +16,36 @@
    [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();
    }
@@ -56,7 +59,6 @@
    public override void Refresh()
    {
        SinglePack singlePack = PackManager.Instance.GetSinglePack(PackType.Hero);
        if (singlePack == null || singlePack.GetAllItems().Count <= 0)
        {
            heroListEmpty.SetActive(true);
@@ -68,13 +70,33 @@
            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)
@@ -86,7 +108,7 @@
    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)
            {
@@ -100,7 +122,6 @@
    {
        if (type != PackType.Hero)
            return;
        SinglePack singlePack = PackManager.Instance.GetSinglePack(PackType.Hero);
        if (singlePack == null)
            return;
Main/System/HeroUI/HeroPosHeadCell.cs
New file
@@ -0,0 +1,16 @@
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)
    {
    }
}
Main/System/HeroUI/HeroPosHeadCell.cs.meta
File was renamed from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 85d03e47b5934534baabc6d5091adaa5
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/System/HeroUI/HeroPosLineCell.cs
New file
@@ -0,0 +1,23 @@
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);
            }
        }
    }
}
Main/System/HeroUI/HeroPosLineCell.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/System/HeroUI/HeroPosLineCell.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 22807977a993b4b438ca473603f2494e
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/System/HeroUI/HeroPosWin.cs
New file
@@ -0,0 +1,187 @@
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);
        }
    }
}
Main/System/HeroUI/HeroPosWin.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/System/HeroUI/HeroPosWin.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: c8849c7f1a741cc438948b5f03557325
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/System/HeroUI/HeroScenePosCell.cs
New file
@@ -0,0 +1,30 @@
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);
    }
}
Main/System/HeroUI/HeroScenePosCell.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/System/HeroUI/HeroScenePosCell.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 5568cf8758fcecf45ac471d4b4bbd6fe
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/System/HeroUI/HeroSelectBehaviour.cs
New file
@@ -0,0 +1,96 @@
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);
    }
}
Main/System/HeroUI/HeroSelectBehaviour.cs.meta
copy from Main/Utility/GameObjectPool.cs.meta copy to Main/System/HeroUI/HeroSelectBehaviour.cs.meta
File was copied from Main/Utility/GameObjectPool.cs.meta
@@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 99e41fbb2b3832c41b1575b72c946cca
timeCreated: 1504310243
licenseType: Pro
guid: 81701dbe94ee5914c97bbc39aa5a418f
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
Main/System/HeroUI/HeroUIManager.cs
@@ -5,13 +5,20 @@
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()
@@ -28,13 +35,186 @@
    }
    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;
    }
}
Main/System/KnapSack/Logic/ItemModel.cs
@@ -165,8 +165,8 @@
        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;
@@ -178,8 +178,9 @@
        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;
Main/System/Main/HomeWin.cs
@@ -19,7 +19,7 @@
    [SerializeField] Text taskNumText;
    [SerializeField] Image awardIcon;
    [SerializeField] Text awardCnt;
    [SerializeField] EffectPlayer taskEffect;
    [SerializeField] UIEffectPlayer taskEffect;
    //关卡
@@ -52,6 +52,9 @@
        TaskManager.Instance.OnTaskUpdate += UpdateTask;
        Refresh();
        UIManager.Instance.OpenWindow<BattleWin>();
        taskEffect.effectId = Random.Range(1007, 1008);
        taskEffect.Play();
    }
    protected override void OnOpen()
    {
Main/System/Message/WaitCallBack.cs
Main/System/PhantasmPavilion/AvatarCell.cs
@@ -88,27 +88,27 @@
        }
    }
    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;
        }
Main/System/Team/TeamManager.cs
@@ -34,6 +34,10 @@
    {
        //  英雄当前所有在的队伍
        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)
@@ -142,9 +146,10 @@
        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;
Main/System/Team/TeamType.cs
@@ -1,12 +1,14 @@
//与服务端的约定  对应函数GetSelectTeamTypeByAttackType
public enum TeamType
{
    None = 0,
    //    PVE
    Story = 1,
    //    PVP
    Arena = 101,
    //    PVP 进攻
    Arena = 21,
    //    PVP 防守
    ArenaDefense = 22,
    Tower = 3,
}
Main/System/Tip/MarqueeWin.cs
@@ -12,7 +12,7 @@
    [SerializeField] RichText marqueeText;
    [SerializeField] RectTransform marqueeBg;
    [SerializeField] TweenCurve tweenCurve;
    [SerializeField] EffectPlayer m_Effect;
    [SerializeField] UIEffectPlayer m_Effect;
    Vector3 fromPos;
    Vector3 toPos;
Main/System/UIBase/UIBase.cs
@@ -353,17 +353,15 @@
    /// <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
Main/Utility/EnumHelper.cs
@@ -1633,8 +1633,8 @@
public enum TitleBtnState
{
    Normal,
    Click,
    Normal, //非点击状态
    Click,  //点击后状态
    Locked,
}
Main/Utility/GameObjectPool.cs
File was deleted