Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class HUD : MonoBehaviour
- {
- public TMPro.TextMeshProUGUI score;
- public TMPro.TextMeshProUGUI timer;
- void Update()
- {
- if(GameStorage.isPlay)
- GameStorage.timer -= Time.deltaTime;
- if(GameStorage.timer <= 0)
- {
- GameStorage.isPlay = false;
- }
- score.text = GameStorage.score.ToString();
- timer.text = $"{(int)GameStorage.timer} sec";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement