using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class UIController : MonoBehaviour { [SerializeField]private PlayerController player; [SerializeField]private TMP_Text pointsTxt; [SerializeField]private Transform pausePnl; [SerializeField]private Transform optionsPnl; // Start is called before the first frame update void Start() { pausePnl.gameObject.SetActive(false); optionsPnl.gameObject.SetActive(false); } // Update is called once per frame void Update() { pointsTxt.text = player.GetPoints().ToString(); } public void EnterPause(){ pausePnl.gameObject.SetActive(true); } public void ExitPause(){ pausePnl.gameObject.SetActive(false); } public void OnOptions(){ ExitPause(); optionsPnl.gameObject.SetActive(true); } public void OnBack(){ optionsPnl.gameObject.SetActive(false); EnterPause(); } public void OnQuit(){ Application.Quit(); } }