From d165af063d7365e143d92c3a950a0b52e683a66e Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 23 一月 2026 15:33:29 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/Main/HomeWin.cs |   32 +++++++++++++++++++++++++++-----
 1 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/Main/System/Main/HomeWin.cs b/Main/System/Main/HomeWin.cs
index dbb0079..91d98ff 100644
--- a/Main/System/Main/HomeWin.cs
+++ b/Main/System/Main/HomeWin.cs
@@ -92,10 +92,10 @@
     [SerializeField] ButtonEx btnChatWin;
     [SerializeField] TextEx txtChatChannel;
 
-
     [SerializeField] Transform transChatBulletView;
     GameObject chatBulletViewPrefab;
 
+    [SerializeField] UIEffectPlayer autoFightBossUIEffectPlayer;
 
 
     /// <summary>
@@ -266,6 +266,8 @@
         TimeMgr.Instance.OnDayEvent += OnDayEvent;
         ChatManager.Instance.OnUpdateTalkEvent += OnUpdateTalkEvent;
         UIManager.Instance.OnOpenWindow += OnOpenWindow;
+        AutoFightModel.Instance.OnAutoChallengeBossEvent += OnAutoChallengeBossEvent;
+        TryPlayAutoFightBoss();
         Display();
         DisplayFirstChargeBtn();
         DisplayOSActivity();
@@ -274,9 +276,8 @@
         // battleWin.SetBattleField(BattleManager.Instance.storyBattleField);
 
         DelayPlayMusic().Forget();
+
     }
-
-
 
     protected override void OnPreClose()
     {
@@ -300,10 +301,22 @@
         TimeMgr.Instance.OnDayEvent -= OnDayEvent;
         ChatManager.Instance.OnUpdateTalkEvent -= OnUpdateTalkEvent;
         UIManager.Instance.OnOpenWindow -= OnOpenWindow;
-
+        AutoFightModel.Instance.OnAutoChallengeBossEvent += OnAutoChallengeBossEvent;
 
         //  鍏抽棴鐨勬椂鍊欐妸鎴樻枟鐣岄潰涔熺粰鍏充簡 铏界劧鏄湪澶栭潰寮�鐨�
         UIManager.Instance.CloseWindow<BattleWin>();
+    }
+
+    private void OnAutoChallengeBossEvent(bool isStart)
+    {
+        if (isStart)
+        {
+            autoFightBossUIEffectPlayer.Play();
+        }
+        else
+        {
+            autoFightBossUIEffectPlayer.Stop();
+        }
     }
 
     private void OnOpenWindow(UIBase win)
@@ -511,6 +524,15 @@
         blessLVText.text = BlessLVManager.Instance.m_TreeLV.ToString();
     }
 
+    void TryPlayAutoFightBoss()
+    {
+        autoFightBossUIEffectPlayer.Stop();
+        if (AutoFightModel.Instance.isAutoAttackSet && AutoFightModel.Instance.isAutoChallengeBoss)
+        {
+            autoFightBossUIEffectPlayer.Play();
+        }
+    }
+
     void DisplayAutoFight()
     {
         if (AutoFightModel.Instance.isAutoAttackSet)
@@ -523,7 +545,7 @@
             autoCloseImg.SetActive(true);
             autoOpenEffect.Stop();
         }
-
+        TryPlayAutoFightBoss();
 
     }
 

--
Gitblit v1.8.0