TO SQUASH: Multiplier label.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityProgressBar;
|
||||
|
||||
public class UIManager : MonoBehaviour
|
||||
{
|
||||
@@ -25,6 +26,8 @@ public class UIManager : MonoBehaviour
|
||||
|
||||
public SpriteRenderer lastLifeLabel;
|
||||
|
||||
public ProgressBar progressBar;
|
||||
|
||||
private AudioSource audioSource;
|
||||
|
||||
private float warningTimer = 0f;
|
||||
@@ -56,6 +59,17 @@ public class UIManager : MonoBehaviour
|
||||
percentCoveredText.text = $"{Clamp(player.percentCovered, 0, 100)}";
|
||||
lasersText.text = $"{Clamp(player.laserCount, 0, 99)}";
|
||||
magnetsText.text = $"{Clamp(player.magnetCount, 0, 99)}";
|
||||
progressBar.Value = player.speedBonus;
|
||||
|
||||
if (player.multiplier != 1)
|
||||
{
|
||||
int multiplierValue = player.multiplier == 0.5f ? 1 : (int)(player.multiplier);
|
||||
multiplierText.text = $"{multiplierValue}";
|
||||
}
|
||||
else
|
||||
{
|
||||
multiplierText.text = "";
|
||||
}
|
||||
|
||||
if (player.lives == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user