public void Branch() { AdsManager ads_manager = ads_manager_govar.go.GetComponent <AdsManager>(); if (ads_manager.CheckOpportunity(ad_id)) { has_event.Invoke(); } else { no_event.Invoke(); } }
IEnumerator ShowBannerWhenReady() { AdsManager ads_manager = ads_manager_govar.go.GetComponent <AdsManager>(); // Debug.Log("Enter coroutine"); while (!ads_manager.CheckOpportunity(ad_id)) { // Debug.Log("Wait"); yield return(new WaitForSeconds(0.5f)); } // Debug.Log("Show"); ads_manager.ShowCurrAd(ad_id); }