From 62188b271cce5e3aec5ca40d58c30f08643e2f60 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 04 九月 2025 23:20:17 +0800
Subject: [PATCH] 117 【武将】武将系统 - 天赋部分,优化自动战斗

---
 Main/Component/UI/Decorate/Tweens/TweenEx.cs |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/Main/Component/UI/Decorate/Tweens/TweenEx.cs b/Main/Component/UI/Decorate/Tweens/TweenEx.cs
index a973999..d31e5c8 100644
--- a/Main/Component/UI/Decorate/Tweens/TweenEx.cs
+++ b/Main/Component/UI/Decorate/Tweens/TweenEx.cs
@@ -99,14 +99,8 @@
             switch (wrapMode)
             {
                 case WrapMode.Once:
-                    if (accumulatedTime > duration)
-                    {
-                        OnOnceEnd();
-                        doTween = false;
-                    }
-                    break;
                 case WrapMode.PingPongOnce:
-                    if (accumulatedTime > duration*2)
+                    if (accumulatedTime > duration)
                     {
                         OnOnceEnd();
                         doTween = false;
@@ -173,9 +167,11 @@
                 t = Mathf.Repeat((accumulatedTime / duration) * curveLength, 1);
                 break;
             case WrapMode.PingPong:
-            case WrapMode.PingPongOnce:
                 t = Mathf.PingPong((accumulatedTime / duration) * curveLength, 1);
                 break;
+            case WrapMode.PingPongOnce:
+                t = Mathf.PingPong((accumulatedTime / (duration/2)) * curveLength, 1);
+                break;
         }
 
         var value = curve.Evaluate(reversal ? curveLength - t : t);

--
Gitblit v1.8.0