1
This commit is contained in:
parent
715767db4a
commit
cf65b660aa
@ -465,23 +465,26 @@ namespace GameLogic
|
|||||||
eGo.transform.localPosition = new Vector3(0, 0, 0);
|
eGo.transform.localPosition = new Vector3(0, 0, 0);
|
||||||
eGo.transform.localScale = Vector3.one;
|
eGo.transform.localScale = Vector3.one;
|
||||||
eGo.gameObject.SetActive(true);
|
eGo.gameObject.SetActive(true);
|
||||||
eGo.transform.DOLocalMoveX(0, 3f).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(() =>
|
||||||
{
|
{
|
||||||
// 给进度条一个缩减回弹效果
|
|
||||||
float originalFill = m_CurrentFillAmount;
|
|
||||||
float shrinkTo = Mathf.Max(0.1f, originalFill - 0.4f); // 缩到原值-0.4,最小0.1
|
|
||||||
DOTween.To(
|
DOTween.To(
|
||||||
() => m_imgValue.fillAmount,
|
() => m_imgValue.fillAmount,
|
||||||
x => m_imgValue.fillAmount = x,
|
x => m_imgValue.fillAmount = x,
|
||||||
shrinkTo, 0.12f
|
originalFill, 1f
|
||||||
).SetEase(Ease.InQuad).OnComplete(() =>
|
).SetEase(Ease.OutElastic);
|
||||||
{
|
});
|
||||||
DOTween.To(
|
|
||||||
() => m_imgValue.fillAmount,
|
eGo.transform.DOLocalMoveX(0, 3f).OnComplete(async () =>
|
||||||
x => m_imgValue.fillAmount = x,
|
{
|
||||||
originalFill, 0.4f
|
|
||||||
).SetEase(Ease.OutElastic);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 特效播放完毕后销毁
|
// 特效播放完毕后销毁
|
||||||
GameObject.Destroy(eGo);
|
GameObject.Destroy(eGo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user