setting up enemy consumption and increasing score - maybe change?

This commit is contained in:
Amaan Shawkath
2022-04-19 21:43:27 +01:00
parent 209470d610
commit e2511e2d53
7 changed files with 6779 additions and 10 deletions

View File

@@ -8,6 +8,8 @@ public class UIManager : MonoBehaviour
{
public TextMeshProUGUI playerHealthLabel;
public TextMeshProUGUI gameOverLabel;
public TextMeshProUGUI scoreLabel;
public Button restartButton;
private GameManager gameManager;
@@ -23,11 +25,12 @@ public class UIManager : MonoBehaviour
//round player health
playerHealthLabel.text = "Health: " + Mathf.Round(gameManager.player.health).ToString();
scoreLabel.text = "Score: " + Mathf.Round(gameManager.score).ToString();
if (gameManager.player.health <= 0)
{
gameOverLabel.gameObject.SetActive(true);
restartButton.gameObject.SetActive(true);
}
}
}