From eec7a4448657602fe94fd5787dc0394a81e8f8d2 Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Fri, 30 May 2025 17:20:13 +0800 Subject: [PATCH] 1 --- .../HotFix/GameLogic/Actor/ActorHItem.cs | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index 80551e1e..fc41228a 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -466,25 +466,9 @@ namespace GameLogic eGo.transform.localScale = Vector3.one; eGo.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, 1f - ).SetEase(Ease.OutElastic); - }); - eGo.transform.DOLocalMoveX(0, 3f).OnComplete(async () => { - + // 特效播放完毕后销毁 GameObject.Destroy(eGo); @@ -499,6 +483,26 @@ namespace GameLogic //// 销毁爆点特效 //GameObject.Destroy(effectGo); }); + + await UniTask.Delay(1000); // 等待特效播放完毕 + + // 给进度条一个缩减回弹效果 + 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, 1f + ).SetEase(Ease.InQuad).OnComplete(() => + { + DOTween.To( + () => m_imgValue.fillAmount, + x => m_imgValue.fillAmount = x, + originalFill, 3f + ).SetEase(Ease.OutElastic); + }); + + } } else if (buff.m_Id == 2)