using System.Collections; using UnityEngine; public class MissionOpenPopup : PopupBase { public static bool NeedBtn; public GameObject go_btn; public override void ShowPopup(int drawOrder) { base.ShowPopup(drawOrder); GameManager.Sound.PlaySFX(ESFXType.Open_Popup); StartCoroutine(Co_Off()); } IEnumerator Co_Off() { go_btn.SetActive(false); yield return new WaitForSeconds(2.5f); if (NeedBtn) go_btn.SetActive(true); else OnClick_OK(); } public void OnClick_OK() { GameManager.UI.HideTopPopup(); } }