added sound script and menu
This commit is contained in:
33
Assets/Scripts/UI/GameScreenView.cs
Normal file
33
Assets/Scripts/UI/GameScreenView.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using VContainer;
|
||||
|
||||
public class GameScreenView : MonoBehaviour
|
||||
{
|
||||
public GameObject gameScreen;
|
||||
public TextMeshProUGUI ScoreText;
|
||||
public Button pauseBtn;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
ScoreText.text = "0";
|
||||
gameScreen.SetActive(false);
|
||||
}
|
||||
|
||||
public void Show()
|
||||
{
|
||||
gameScreen.SetActive(true);
|
||||
}
|
||||
public void Hide()
|
||||
{
|
||||
gameScreen.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
public void SetScore(int score)
|
||||
{
|
||||
ScoreText.text = score.ToString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user