From ca577b96e0022e0ddaa8e106e147e53d8166df1c Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期五, 07 十一月 2025 11:40:36 +0800
Subject: [PATCH] 164 天子的考验-客户端

---
 Main/Component/UI/Common/IntensifySmoothSlider.cs |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/Main/Component/UI/Common/IntensifySmoothSlider.cs b/Main/Component/UI/Common/IntensifySmoothSlider.cs
index 97cb452..5d5f3a4 100644
--- a/Main/Component/UI/Common/IntensifySmoothSlider.cs
+++ b/Main/Component/UI/Common/IntensifySmoothSlider.cs
@@ -170,14 +170,34 @@
     private void CheckForValueChangeNotification(float currentSliderValue)
     {
         int currentSegment = GetCurrentSegment(currentSliderValue);
-        
+
         // 濡傛灉褰撳墠鐨勫垎娈电储寮曚笌涓婃瑙﹀彂浜嬩欢鏃剁殑绱㈠紩涓嶅悓锛岃鏄庡凡璺ㄨ秺鍒嗘杈圭晫銆�
         if (currentSegment != m_LastNotifiedSegment)
         {
             ValueChangeAction?.Invoke(currentSliderValue, CurrentStage);
             // 鏇存柊鈥滀笂娆¤Е鍙戔�濈殑绱㈠紩涓哄綋鍓嶇储寮曪紝闃叉鏈垎娈靛唴閲嶅瑙﹀彂銆�
-            m_LastNotifiedSegment = currentSegment; 
+            m_LastNotifiedSegment = currentSegment;
         }
     }
+    
+    /// <summary>
+    /// 绔嬪嵆璁剧疆婊戝潡鐨勭姸鎬侊紙鍊煎拰闃舵锛夛紝鑰屼笉瑙﹀彂浠讳綍浜嬩欢鎴栧钩婊戝姩鐢汇��
+    /// </summary>
+    /// <param name="newValue">瑕佽缃殑鏂扮洰鏍囧�� (0-1)銆�</param>
+    /// <param name="newStage">瑕佽缃殑鏂扮洰鏍囬樁娈靛拰褰撳墠闃舵銆�</param>
+    public void SetStateInstantly(float newValue, int newStage)
+    {
+        this.value = newValue;
+        this.stage = newStage;
+        this.presentStage = newStage;
+        if (m_Slider != null)
+        {
+            m_Slider.value = this.value; 
+        }
+        refSpeed = 0f; 
+        isMoving = false;
+        // 纭繚涓嬫 LateUpdate 涓嶄細鍥犱负绱㈠紩涓嶅尮閰嶈�岄敊璇Е鍙� ValueChangeAction
+        m_LastNotifiedSegment = GetCurrentSegment(this.value);
+    }
 
 }
\ No newline at end of file

--
Gitblit v1.8.0