From 664c5ff32b238d44451887059fb37c030cfe714b Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Fri, 30 May 2025 15:19:11 +0800 Subject: [PATCH] 1 --- .../HotFix/GameLogic/Actor/ActorHItem.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index 6a55c1a1..44ed6890 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -389,6 +389,24 @@ namespace GameLogic effectGo.transform.localPosition = Vector3.zero; effectGo.transform.localScale = Vector3.one; effectGo.gameObject.SetActive(true); + + // 给进度条一个缩减回弹效果 + 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); + }); + + await UniTask.Delay(2000); // 销毁爆点特效 GameObject.Destroy(effectGo);