yyl
2026-03-26 f4a702e212d1853735f8dae399da69d23bfa510e
Main/System/HeroUI/HeroTrainWin.cs
@@ -104,11 +104,9 @@
    // 区分突破和培养模块
    [SerializeField] HeroLVBreakCell heroLVBreakCell;   //对应培养的 allAttrScroll  和 attrBtn
    [SerializeField] GroupButtonEx trainMainButton; //培养入口按钮
    [SerializeField] GroupButtonEx breakMainButton; //突破入口按钮
    //入口伪红点用图片代替
    [SerializeField] Image trainMainRedImg;
    [SerializeField] Image breakMainRedImg;
    bool isTrainMainRed;
    bool isBreakMainRed;
    #endregion
@@ -124,10 +122,12 @@
        showFuncBtn.AddListener(() =>
        {
            funcForm.SetActive(true);
            UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 1;
        });
        seeLhBtn.AddListener(() =>
        {
            funcForm.SetActive(false);
            UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 0;
        });
        closeBtn.AddListener(CloseWindow);
        rightBtn.AddListener(() =>
@@ -205,25 +205,13 @@
            freezeTipGo.SetActive(!freezeTipGo.activeSelf);
        });
        trainMainButton.AddListener(() =>
        {
            functionOrder = 0;
            DisplayTrainOrBreak(hero);
            ForceRefreshLayout();
        });
        breakMainButton.AddListener(() =>
        {
            functionOrder = 1;
            DisplayTrainOrBreak(hero);
            unfoldState = false;
            RefreshFoldState();
        });
    }
    protected override void OnPreOpen()
    {
        PackManager.Instance.RefreshItemLockEvent += RefreshItemLockEvent;
        HeroManager.Instance.onHeroChangeEvent += RefreshHeroEvent;
        UIManager.Instance.OnCloseWindow += OnCloseWindow;
@@ -232,10 +220,25 @@
        guid = HeroUIManager.Instance.selectHeroGuid;
        hero = HeroManager.Instance.GetHero(guid);
        if (functionOrder == 0)
        {
            DisplayTrainOrBreak(hero);
            ForceRefreshLayout();
        }
        else if (functionOrder == 1)
        {
            DisplayTrainOrBreak(hero);
            unfoldState = false;
            RefreshFoldState();
        }
        unfoldState = false;
        addPerObject.SetActive(false);
        allAttrScroll.verticalNormalizedPosition = 1;
        Display();
        HeroUIManager.Instance.PlayerLHSound(hero.SkinID);
    }
@@ -263,8 +266,9 @@
    public void Display()
    {
        bgTexture.SetTexture2D("countryBG" + hero.heroConfig.Country);
        bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(hero.SkinID, hero.heroConfig.Country));
        roleLhModel.Create(hero.SkinID, 1, motionName: "", isLh: true);
        roleXsModel.Create(hero.SkinID, 1);
        jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(hero.heroConfig.Class));
        jobPosNameText.text = HeroUIManager.Instance.GetJobName(hero.heroConfig.Class);
@@ -295,6 +299,8 @@
        RefreshAwake();
        RefreshFreeze();
        RefreshRedImg();
        HeroUIManager.Instance.UpdateTheHeroCardRedpoint(isTrainMainRed, isBreakMainRed,
            HeroUIManager.Instance.HeroAllSkinStateForRedpoint(hero.heroId) > 0);
        DisplayTrainOrBreak(hero);
        ShowDeleteTip();
@@ -393,9 +399,18 @@
        {
            resultIndex = 0;
        }
        guid = HeroUIManager.Instance.heroSortList[resultIndex];
        guid = HeroUIManager.Instance.selectHeroGuid = HeroUIManager.Instance.heroSortList[resultIndex];
        hero = HeroManager.Instance.GetHero(guid);
        Display();
        HeroUIManager.Instance.PlayerLHSound(hero.SkinID);
        //控制一级功能界面的皮肤按钮
        var ui = UIManager.Instance.GetUI<HeroTrainBaseWin>();
        if (ui != null)
        {
            ui.ShowSkinBtn();
        }
    }
@@ -877,8 +892,8 @@
        redpointAwake.SetActive(false);
        redpointGift.SetActive(false);
        redpointLVUP.SetActive(false);
        trainMainRedImg.SetActive(false);
        breakMainRedImg.SetActive(false);
        isTrainMainRed = false;
        isBreakMainRed = false;
        redpointBreakLVUP.SetActive(false);
@@ -889,7 +904,7 @@
        if (heroCnt > 1 && hero.heroStar < hero.GetCurMaxStar())
        {
            redpointGift.SetActive(true);
            trainMainRedImg.SetActive(true);
            isTrainMainRed = true;
        }
@@ -900,7 +915,7 @@
            if (itemPack.GetCountById(lvupConfig.UPCostItem[0]) >= lvupConfig.UPCostItem[1])
            {
                redpointLVUP.SetActive(true);
                trainMainRedImg.SetActive(true);
                isTrainMainRed = true;
            }
        }
@@ -922,7 +937,7 @@
                if (itemPack.GetCountById(config.UPCostItem[0]) >= config.UPCostItem[1])
                {
                    redpointAwake.SetActive(true);
                    trainMainRedImg.SetActive(true);
                    isTrainMainRed = true;
                }
            }
        }
@@ -930,7 +945,7 @@
        if (HeroUIManager.Instance.IsCanBreak(hero))
        {
            redpointBreakLVUP.SetActive(true);
            breakMainRedImg.SetActive(true);
            isBreakMainRed = true;
        }
    }
@@ -945,7 +960,6 @@
            heroLVBreakCell.SetActive(false);
            allAttrScroll.SetActive(true);
            attrBtn.SetActive(true);
            trainMainButton.SelectBtn();
        }
        else
        {
@@ -954,7 +968,6 @@
            attrBtn.SetActive(false);
            heroLVBreakCell.Display(hero);
            breakMainButton.SelectBtn();
        }
    }