lcy
2025-11-05 3b2a6bb9047cfce9f501593b3669a9c1af6c5df4
Main/System/Main/HomeWin.cs
@@ -52,8 +52,10 @@
    [SerializeField] Text blessLVText;
    [SerializeField] Button mailBtn;
    //其他功能入口
    [SerializeField] Button monthCardBtn;
    //右侧功能
    [SerializeField] Button funcColBtn;
    [SerializeField] RightFuncInHome rightFuncInHome;
    [SerializeField] Button FirstChargeBtn;
    /// <summary>
@@ -80,10 +82,7 @@
        });
        monthCardBtn.AddListener(() =>
        {
            InvestModel.Instance.BuyInvest(InvestModel.monthCardType);
        });
        FirstChargeBtn.AddListener(() =>
        {
@@ -112,6 +111,10 @@
        });
        restBtn.AddListener(GotoRest);
        funcColBtn.AddListener(()=>
        {
            rightFuncInHome.ShowFuncCol(true);
        });
    }
@@ -128,6 +131,7 @@
        DisplayLevel();
        DisplayRestState();
        funcColBtn.SetActive(FuncOpen.Instance.IsFuncOpen(GeneralDefine.mainRightFuncOpenFuncID));
    }
    protected override void OnPreOpen()
@@ -142,6 +146,7 @@
        FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChange;
        FirstChargeManager.Instance.OnUpdateFirstChargeInfo += OnUpdateFirstChargeInfo;
        GlobalTimeEvent.Instance.secondEvent += OnSecondEvent;
        HeroUIManager.Instance.OnUnLockHeroCountEvent += OnUnLockHeroCountEvent;
        Display();
        DisplayFirstChargeBtn();
@@ -163,6 +168,7 @@
        FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChange;
        FirstChargeManager.Instance.OnUpdateFirstChargeInfo -= OnUpdateFirstChargeInfo;
        GlobalTimeEvent.Instance.secondEvent -= OnSecondEvent;
        HeroUIManager.Instance.OnUnLockHeroCountEvent -= OnUnLockHeroCountEvent;
        //  关闭的时候把战斗界面也给关了 虽然是在外面开的
        UIManager.Instance.CloseWindow<BattleWin>();
@@ -170,14 +176,14 @@
    private void OnClickEnterBoss()
    {
        BattleField battleField = BattleManager.Instance.GetBattleFieldByMapID(2); //BOSS战斗
        // BattleField battleField = BattleManager.Instance.GetBattleFieldByMapID(2); //BOSS战斗
        if (null != battleField)
        {
            FullScreenBattleWin fsBattleWin = UIManager.Instance.OpenWindow<FullScreenBattleWin>();
            fsBattleWin.SetBattleField(battleField);
            return;
        }
        // if (null != battleField)
        // {
        //     StoryBossBattleWin fsBattleWin = UIManager.Instance.OpenWindow<StoryBossBattleWin>();
        //     fsBattleWin.SetBattleField(battleField);
        //     return;
        // }
        UIManager.Instance.OpenWindow<MainBossEnterWin>();
    }
@@ -210,7 +216,7 @@
    void RefreshRecharge()
    {
        monthCardBtn.SetActive(!InvestModel.Instance.IsInvested(InvestModel.monthCardType));
        //monthCardBtn.SetActive(!InvestModel.Instance.IsInvested(InvestModel.monthCardType));
    }
@@ -298,10 +304,12 @@
    {
        if (teamType != TeamType.Story)
            return;
        var team = TeamManager.Instance.GetTeam(teamType);
        var heros = team.GetHerosOnTeam();
        //显示卡牌
        for (int i = 0; i < heroFightingCardCells.Length; i++)
        {
            heroFightingCardCells[i].Display(i);
            heroFightingCardCells[i].Display(i, heros);
        }
    }
@@ -343,7 +351,7 @@
        //【普通】关卡名字1-6
        levelName.text = Language.Get("mainui7", chapterConfig.Level, chapterConfig.ChapterName, chapterID, levelNum);
        bool canChallengeBoss = AutoFightModel.Instance.CanChallengeBoss();
        bool canChallengeBoss = MainLevelManager.Instance.CanChallengeBoss();
        //BOSS
        if (canChallengeBoss)
        {
@@ -421,6 +429,10 @@
        {
            DisplayFirstChargeBtn();
        }
        else if (funcId == GeneralDefine.mainRightFuncOpenFuncID)
        {
            funcColBtn.SetActive(FuncOpen.Instance.IsFuncOpen(GeneralDefine.mainRightFuncOpenFuncID));
        }
    }
    private void OnUpdateFirstChargeInfo()
@@ -432,4 +444,9 @@
    {
        DisplayFirstChargeBtn();
    }
    void OnUnLockHeroCountEvent()
    {
        DisplayCard(TeamType.Story);
    }
}