From 937a33b38a18620000c3e6afc4eeb4c6c5fbb3f4 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 29 九月 2025 21:13:14 +0800
Subject: [PATCH] 0312 战锤区增加开光表现;点击锤子增加预存攻击等待到下一次可释放(优化玩家不好掌控点击时机);区分主战场和其他战场的加速倍率

---
 Main/System/Battle/BattleField/BattleField.cs                           |    9 ++++
 Main/Component/UI/Effect/UIEffectPlayer.cs                              |    9 ++++
 Main/System/Main/MainWin.cs                                             |   27 +++++++++++++
 Main/System/Battle/BattleField/StoryBattleField.cs                      |   26 +++++++++---
 Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs |   15 ++++++-
 5 files changed, 75 insertions(+), 11 deletions(-)

diff --git a/Main/Component/UI/Effect/UIEffectPlayer.cs b/Main/Component/UI/Effect/UIEffectPlayer.cs
index 345fe94..37254a2 100644
--- a/Main/Component/UI/Effect/UIEffectPlayer.cs
+++ b/Main/Component/UI/Effect/UIEffectPlayer.cs
@@ -49,4 +49,13 @@
         return effectPlayer;
     }
 
+
+	public void SetEnabled(bool isEnable)
+	{ 
+		if (spineComp == null)
+		{
+			return;
+		}
+		spineComp.enabled = isEnable;
+	}
 }
diff --git a/Main/System/Battle/BattleField/BattleField.cs b/Main/System/Battle/BattleField/BattleField.cs
index 5a2ae2d..48447fe 100644
--- a/Main/System/Battle/BattleField/BattleField.cs
+++ b/Main/System/Battle/BattleField/BattleField.cs
@@ -121,7 +121,14 @@
         battleRootNode.SetBackground(ResManager.Instance.LoadAsset<Texture>("Texture/FullScreenBg", "mainui_img_277"));
 
         SetBattleStartState();
-        SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]);
+        if (MapID == 1)
+        {
+            SetSpeedRatio(BattleManager.Instance.speedGear[AutoFightModel.Instance.fightSpeed - 1]);
+        }
+        else
+        { 
+            SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]);
+        }
         SetRootNodePosition();
     }
 
diff --git a/Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs b/Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs
index 85ffe18..5e0b460 100644
--- a/Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs
+++ b/Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs
@@ -5,6 +5,7 @@
 public class HandModeOperationAgent : IOperationAgent
 {
 	protected StoryBattleField storyBattleField;
+	bool autoNext = false;	//棰勫瓨鐜╁鐨勪笅涓�娆℃敾鍑伙紝璁╀笅涓�娆¤嚜鍔ㄦ墽琛岋紝鍥犱负鐜╁鐐圭殑鏃舵満涓嶄竴瀹氭槸鍒氬ソ鐨勫彲鏀诲嚮鐘舵��
 
 	public HandModeOperationAgent(BattleField battleField) : base(battleField)
 	{
@@ -14,14 +15,24 @@
 	public override void Run()
 	{
 		base.Run();
+		if (autoNext)
+		{
+			if (storyBattleField.RequestFight())
+			{
+				//鐩村埌鎴愬姛涓烘
+				autoNext = false;
+			}
+		}
 	}
 
 	//	閫氳繃涓荤晫闈㈢殑鎸夐挳鎺ㄥ姩(璋冪敤)DoNext
 	public override void DoNext()
 	{
 		base.DoNext();
-
-		storyBattleField.RequestFight();
+		if (!storyBattleField.RequestFight())
+		{
+			autoNext = true;
+		}
 	}
 
 
diff --git a/Main/System/Battle/BattleField/StoryBattleField.cs b/Main/System/Battle/BattleField/StoryBattleField.cs
index f454283..9b510dc 100644
--- a/Main/System/Battle/BattleField/StoryBattleField.cs
+++ b/Main/System/Battle/BattleField/StoryBattleField.cs
@@ -179,17 +179,19 @@
     }
 
 
-    //璇锋眰鍗曟鎴樻枟
-    public void RequestFight()
+    //璇锋眰鍗曟鎴樻枟, 杩斿洖鏄惁鎴愬姛鎿嶄綔锛堥鍒や笅涓�娆℃槸鍙互缁х画鐨勭姸鎬侊級
+    public bool RequestFight()
     {
         if (IsPause)
         {
             //澶栭儴鎺у埗 IsPause
             //杩橀渶鑰冭檻鍏朵粬涓嶅彲鎴樻枟鐘跺喌锛屼富绾跨殑BOSS鎴樻枟涔熸槸鍙﹀涓�涓満鏅笖涓嶈兘鍒囧嚭鏉� 绛夎烦杩囨垨鑰呯粨鏉�
-            return;
+            return true;
         }
         if (BattleManager.Instance.isWaitServerStory)
-            return;
+        { 
+            return true;
+        }
 
         //	褰撳墠娌℃湁鍦ㄦ挱鏀炬垬鏂楀綍鍍�
         if (!recordPlayer.IsPlaying())
@@ -209,7 +211,7 @@
                         dropList.Add(item.gridIndex);
                     }
                     EquipModel.Instance.NotifyItemDrop(dropList, null);
-                    return;
+                    return false;
                 }
 
                 //	妫�鏌ヤ竴涓嬮敜瀛愮殑娑堣��
@@ -217,8 +219,10 @@
                 {
                     //澶氭闃茶寖
                     if (GetBattleMode() != BattleMode.Stop)
+                    {
                         HaveRest();
-                    return;
+                    }
+                    return true;
                 }
 
                 // 璇锋眰涓嬩竴涓垬鏂楀寘 鎴栬�呮鏌ユ垬鏂楁槸鍚︾粨鏉�
@@ -245,7 +249,7 @@
                 else
                 {
                     BattleDebug.LogError("unknown battle state");
-                    return;
+                    return true;
                 }
 
 
@@ -258,13 +262,21 @@
                 {
                     BattleManager.Instance.MainFightRequest(4);
                 }
+                return true;
+            }
+            else
+            { 
             }
         }
         else
         {
             if (!AutoFightModel.Instance.isAutoAttack)
+            {
+
                 BattleDebug.LogError("action doesnt finish, wait a moment please");
+            }
         }
+        return false;
     }
     
     protected override void SetRootNodePosition()
diff --git a/Main/System/Main/MainWin.cs b/Main/System/Main/MainWin.cs
index 8cacbdf..06de8d3 100644
--- a/Main/System/Main/MainWin.cs
+++ b/Main/System/Main/MainWin.cs
@@ -24,9 +24,10 @@
     [SerializeField] Image fightHeroImg; //鎴樻枟鏄剧ず鑻遍泟
     [SerializeField] ScaleTween fightHeroScale; //鎴樻枟鏄剧ず鑻遍泟缂╂斁
     [SerializeField] UIEffectPlayer fightEffect;
+    [SerializeField] UIEffectPlayer openCloseAnim;
     [SerializeField] FillTween cdTween;
 
-
+    public bool isFirstOpen = true; //棣栨鎵撳紑
     public Text hammerText;
 
     protected override void InitComponent()
@@ -77,6 +78,7 @@
             return;
         }
 
+        ClickAnimation(index);
         // 鏇存柊褰撳墠閫変腑鐨勬爣绛剧储寮�
         functionOrder = index;
 
@@ -87,6 +89,27 @@
         OpenSubUIByTabIndex();
     }
 
+    void ClickAnimation(int index)
+    {
+        if (isFirstOpen || (functionOrder != 0 && index == 0))
+        {
+            openCloseAnim.onComplete = () =>
+            {
+                openCloseAnim.SetEnabled(true);
+            };
+            openCloseAnim.PlayByArrIndex(1);
+            isFirstOpen = false;
+
+        }
+        else if (functionOrder == 0 && index != 0)
+        {
+            openCloseAnim.onComplete = () =>
+            {
+                openCloseAnim.SetEnabled(true);
+            };
+            openCloseAnim.PlayByArrIndex(0);
+        }
+    }
 
 
     /// <summary>
@@ -224,6 +247,7 @@
         {
             //涓诲煄鐣岄潰
             fightOtherWinBG.SetActive(false);
+            fightOtherWinWarnImg.SetActive(false);
             fightBG.SetActive(true);
 
 
@@ -259,6 +283,7 @@
     }
 
 
+
     void RefreshFightIng(bool isfighting = false)
     {
         if (isfighting)

--
Gitblit v1.8.0