Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.UI;
- public class GameManager : MonoBehaviour
- {
- public static GameManager instance = null;
- [SerializeField] private Text balanceText;
- public static int balance;
- private void Awake()
- {
- if (instance == null)
- instance = this;
- else if (instance != this)
- Destroy(gameObject);
- }
- private void Update()
- {
- balanceText.text = balance.ToString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement