From 3668f36b20443f5a78e6f916cbce3857ce82e07e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 27 十一月 2025 18:13:39 +0800
Subject: [PATCH] 0312 武将攻击增加蒙版,用于提示还未轮到攻击 日常任务改成立即刷新

---
 Main/System/Main/MainWin.cs |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Main/System/Main/MainWin.cs b/Main/System/Main/MainWin.cs
index 6f52e82..cf8dec2 100644
--- a/Main/System/Main/MainWin.cs
+++ b/Main/System/Main/MainWin.cs
@@ -27,6 +27,7 @@
     [SerializeField] UIEffectPlayer fightEffect;
     [SerializeField] UIEffectPlayer openCloseAnim;
     [SerializeField] FillTween cdTween;
+    [SerializeField] Transform nextCantAttackMask;
     [SerializeField] Text hammerText;
     [SerializeField] Text multiFightText;
 
@@ -56,6 +57,7 @@
         AutoFightModel.Instance.OnFightEvent += OnSkillCast;
         RenameManager.Instance.OnUpdateRenameResultEvent += OnUpdateRenameResultEvent;
         UIManager.Instance.OnCloseWindow += OnCloseWindow;
+        GlobalTimeEvent.Instance.MSEvent += OnMSEvent;
         base.OnPreOpen();
 
         // 鍒锋柊UI
@@ -68,6 +70,8 @@
         AutoFightModel.Instance.OnFightEvent -= OnSkillCast;
         RenameManager.Instance.OnUpdateRenameResultEvent -= OnUpdateRenameResultEvent;
         UIManager.Instance.OnCloseWindow -= OnCloseWindow;
+        GlobalTimeEvent.Instance.MSEvent -= OnMSEvent;
+
         base.OnPreClose();
         isForcePlayFightUIAnim = true;
     }
@@ -347,6 +351,7 @@
         if (isfighting)
         {
             fightEffect.Play();
+            nextCantAttackMask.localScale = Vector3.zero;
             cdTween.SetStartState();
             cdTween.Play(() =>
             {
@@ -355,6 +360,7 @@
                 {
                     AutoFightModel.Instance.fightingHeroSkinID = tmpHero.SkinID;
                     fightHeroImg.SetOrgSprite(HeroSkinConfig.Get(AutoFightModel.Instance.fightingHeroSkinID).SquareIcon, "HeroHead");
+                    nextCantAttackMask.localScale = Vector3.one;
                 }
             });
             fightHeroScale.SetStartState();
@@ -385,6 +391,17 @@
         fightHeroImg.SetOrgSprite(HeroSkinConfig.Get(AutoFightModel.Instance.fightingHeroSkinID).SquareIcon, "HeroHead");
     }
 
+    void OnMSEvent()
+    {
+        if (nextCantAttackMask.localScale == Vector3.one)
+        {
+            if (BattleManager.Instance.storyBattleField.IsCanRequestFight())
+            {
+                nextCantAttackMask.localScale = Vector3.zero;
+            }
+        }
+    }
+
     void OnSkillCast(bool isfighting)
     {
 

--
Gitblit v1.8.0