UI_Script.cs 422 B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class UI_Script : MonoBehaviour
  6. {
  7. private Canvas canvas;
  8. // Start is called before the first frame update
  9. void Start()
  10. {
  11. canvas = GetComponent<Canvas>();
  12. }
  13. // Update is called once per frame
  14. void Update()
  15. {
  16. canvas.enabled = !Static_GlobalStats.paused;
  17. }
  18. }