private void Awake() { if (mInstance == null) { mInstance = this; } }
//---------------------------------------------------------------------------------------------------- void OnLoadNextLevelClicked() { AdsManager.GetInstance().ShowInterstialAds(); Time.timeScale = 1.0f; gameObject.transform.localScale = Vector3.zero; mMainTextHolder.localPosition = mInitialTextHolderPos; HJPlayerScoreAndLevelManager.Instance().LoadNextLevel(); HJGameEventHandler.Instance().TriggerOnNextLevelLoadEvent(); }
//-------------------------------------------------------------------------------------------------------------------------------------------------------- public void ShowInterstialAd(Action <bool> isAdShown) { #if UNITY_EDITOR isAdShown?.Invoke(false); #elif UNITY_ANDROID StartCoroutine(CheckForInternet(resp => { if (resp) { AdsManager.GetInstance().ShowInterstialAds(); isAdShown?.Invoke(true); } else { isAdShown?.Invoke(false); } })); #endif }