Skip to content

Commit 94c4a76

Browse files
committed
Fix Display
1 parent cbac601 commit 94c4a76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

UOP1_Project/Assets/Scripts/UI/UIHeartDisplay.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ private void OnDisable()
2222
public void SetImage(float percent)
2323
{
2424
_slidingImage.fillAmount = percent;
25-
if (percent < 1)
25+
if (percent == 0)
2626
{
2727
_bgImage.color = new Color(_bgImage.color.r, _bgImage.color.g, _bgImage.color.b, 0.5f);
2828
}
29-
if (percent == 1)
29+
else
3030
{
3131
_bgImage.color = new Color(_bgImage.color.r, _bgImage.color.g, _bgImage.color.b, 1);
3232
}

0 commit comments

Comments
 (0)