simple UI added
This commit is contained in:
28
Assets/Scripts/UI/DeathScreenView.cs
Normal file
28
Assets/Scripts/UI/DeathScreenView.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class DeathScreenView : MonoBehaviour
|
||||
{
|
||||
public GameObject deathScreen;
|
||||
public Button rePlayButton;
|
||||
public Button backButton;
|
||||
public TextMeshProUGUI highScoreText;
|
||||
public TextMeshProUGUI currentScoreText;
|
||||
private void Start()
|
||||
{
|
||||
deathScreen.SetActive(false);
|
||||
}
|
||||
|
||||
public void Show(int score, int highscore)
|
||||
{
|
||||
highScoreText.text = highscore.ToString();
|
||||
currentScoreText.text = score.ToString();
|
||||
deathScreen.SetActive(true);
|
||||
|
||||
}
|
||||
public void Hide()
|
||||
{
|
||||
deathScreen.SetActive(false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user