Skip to content

Commit

Permalink
Merge pull request #1 from SirBang/FillBarView
Browse files Browse the repository at this point in the history
FEAT: Fillbar speed optimization
  • Loading branch information
SirBang authored Apr 26, 2024
2 parents 6a0dbfe + 9de0caf commit b956e8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Space Fighter/Assets/Scripts/UI/FillBarView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ private void RefreshWhiteFill()
}

float whiteFillAmount = m_currentWhiteFillValue / m_maxValue;
m_whiteFillImage.fillAmount = Mathf.Clamp(whiteFillAmount, 0, 1);
m_whiteFillImage.fillAmount = Mathf.Clamp(whiteFillAmount, 0, 1.5);
}

private void RefreshFill()
{
float fillAmount = m_currentValue / m_maxValue;
fillAmount = Mathf.Clamp(fillAmount, 0, 1);
fillAmount = Mathf.Clamp(fillAmount, 0, 1.5);

if (m_fillImage.fillAmount != fillAmount)
{
Expand Down

0 comments on commit b956e8a

Please # to comment.