using UnityEngine; using System.Collections; public class Text_PauseCounter : MonoBehaviour { private static Text_PauseCounter _instance; [SerializeField] private UILabel countdown; private void Start() { _instance = this; } public static void Show() { if (_instance) { _instance.StartCoroutine(_instance.ShowRoutine()); } } private IEnumerator ShowRoutine() { InGameScriptCS.Instance.Pause(); countdown.gameObject.SetActive(true); for (int i = 3; i > 0; i--) { countdown.text = i.ToString(); yield return new WaitForSeconds(1); } countdown.gameObject.SetActive(false); InGameScriptCS.Instance.Resume(); //InGameScriptCS.Instance.InvokeResurrection(); } }