feature: Progress bar tween
This commit is contained in:
parent
50db5ba29e
commit
0b7fcd2ae7
2 changed files with 3 additions and 2 deletions
|
@ -1500,7 +1500,7 @@ MonoBehaviour:
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
m_FillMethod: 1
|
m_FillMethod: 1
|
||||||
m_FillAmount: 1
|
m_FillAmount: 0
|
||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using DG.Tweening;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ namespace Flow {
|
||||||
|
|
||||||
private void UpdateFill() {
|
private void UpdateFill() {
|
||||||
float fillPercentage = _progressDone / (float)numberToWin;
|
float fillPercentage = _progressDone / (float)numberToWin;
|
||||||
bar.fillAmount = fillPercentage;
|
bar.DOFillAmount(fillPercentage, .25f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue