From db0a9f8944bcb26a7af4ba1e0c5b9e09fd26f024 Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Thu, 29 May 2025 02:20:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=BC=B9=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HotFix/GameLogic/Actor/ActorHItem.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index a5b870d3..bd06e940 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -384,6 +384,22 @@ namespace GameLogic eGo.gameObject.SetActive(true); eGo.transform.DOLocalMoveX(0, 1.5f).OnComplete(async () => { + // 给进度条一个缩减回弹效果 + float originalFill = m_CurrentFillAmount; + float shrinkTo = Mathf.Max(0.1f, originalFill - 0.4f); // 缩到原值-0.4,最小0.1 + DOTween.To( + () => m_imgValue.fillAmount, + x => m_imgValue.fillAmount = x, + shrinkTo, 0.12f + ).SetEase(Ease.InQuad).OnComplete(() => + { + DOTween.To( + () => m_imgValue.fillAmount, + x => m_imgValue.fillAmount = x, + originalFill, 0.4f + ).SetEase(Ease.OutElastic); + }); + // 特效播放完毕后销毁 GameObject.Destroy(eGo); // 生成爆点