public void HideInterstitial() { if (interstitial != null) { interstitial.Destroy(); } }
private void InterstitialReklamYukle() { if (string.IsNullOrEmpty(interstitialKimligi)) { return; } if (interstitialReklam != null) { interstitialReklam.Destroy(); } if (testModu && string.IsNullOrEmpty(testDeviceID)) { #if UNITY_ANDROID interstitialReklam = new InterstitialAd("ca-app-pub-3940256099942544/1033173712"); #elif UNITY_IOS interstitialReklam = new InterstitialAd("ca-app-pub-3940256099942544/4411468910"); #endif } else { interstitialReklam = new InterstitialAd(interstitialKimligi); } interstitialReklam.OnAdClosed += InterstitialDelegate; interstitialReklam.OnAdFailedToLoad += InterstitialYuklenemedi; interstitialReklam.LoadAd(ReklamIstegiOlustur()); interstitialIstekTimeoutZamani = Time.realtimeSinceStartup + 10f; }
public void DestoryInterstitialAd() { if (interstitialAd != null) { interstitialAd.Destroy(); } }
void CloseInterstitialAd() { if (interstitial != null) { interstitial.Destroy(); } }
public void Init_InterstitialAd() { #if UNITY_EDITOR string adUnitId = "unused"; #elif UNITY_ANDROID string adUnitId = InterstitialAd_Android_ID; #elif UNITY_IPHONE string adUnitId = InterstitialAd_IOS_ID; #else string adUnitId = "unexpected_platform"; #endif // Clean up interstitial before using it if (interstitialAd != null) { interstitialAd.Destroy(); } interstitialAd = new InterstitialAd(adUnitId); // Add Event Handlers interstitialAd.OnAdLoaded += HandleOnAdLoaded_InterstitialAd; interstitialAd.OnAdFailedToLoad += HandleOnAdFailedToLoad_InterstitialAd; interstitialAd.OnAdOpening += HandleOnAdOpened_InterstitialAd; interstitialAd.OnAdClosed += HandleOnAdClosed_InterstitialAd; interstitialAd.OnAdLeavingApplication += HandleOnAdLeavingApplication_InterstitialAd; // Load an interstitial ad interstitialAd.LoadAd(CreateAdRequest()); }
public void RequestAndLoadInterstitialAd() { statusText.text = "Requesting Interstitial Ad."; #if UNITY_EDITOR string adUnitId = "unused"; #elif UNITY_ANDROID string adUnitId = "ca-app-pub-3940256099942544/1033173712"; #elif UNITY_IPHONE string adUnitId = "ca-app-pub-3940256099942544/4411468910"; #else string adUnitId = "unexpected_platform"; #endif // Clean up interstitial before using it if (interstitialAd != null) { interstitialAd.Destroy(); } interstitialAd = new InterstitialAd(adUnitId); // Add Event Handlers interstitialAd.OnAdLoaded += (sender, args) => OnAdLoadedEvent.Invoke(); interstitialAd.OnAdFailedToLoad += (sender, args) => OnAdFailedToLoadEvent.Invoke(); interstitialAd.OnAdOpening += (sender, args) => OnAdOpeningEvent.Invoke(); interstitialAd.OnAdClosed += (sender, args) => OnAdClosedEvent.Invoke(); interstitialAd.OnAdLeavingApplication += (sender, args) => OnAdLeavingApplicationEvent.Invoke(); // Load an interstitial ad interstitialAd.LoadAd(CreateAdRequest()); }
private void Intersititial_AdClosed(object sender, System.EventArgs e) { //throw new System.NotImplementedException(); if (intersititial != null) { intersititial.Destroy(); LeanTween.dispatchEvent((int)Events.INTERSTITIALCLOSED); } RequestInterstitial(); }
public void Clear() { if (null != m_banner) { m_banner.Destroy(); } if (null != m_interstitial) { m_interstitial.Destroy(); } }
public void ShowInterstitial() { if (interstitial.IsLoaded()) { interstitial.Show(); } else { interstitial.Destroy(); InterstitialSetup(); } }
public void HandleOnAdClosed(object sender, EventArgs args) { if (firstRun) { BackEndManager.instance.ChangeState(STATES.TUTORIAL); } else { BackEndManager.instance.ChangeState(STATES.MAINMENU); } inter.Destroy(); }
void OnApplicationQuit() { foreach (int fileId in loadedFiles) { AndroidNativeAudio.unload(fileId); } AndroidNativeAudio.releasePool(); if (interstitial != null) { interstitial.Destroy(); } }
private void InterstitialAdClosed(object sender, EventArgs args) { OnInterstitialAdClosed.Invoke(); if (activeInterstitial == null) { return; } activeInterstitial.Destroy(); activeInterstitial = null; }
static void InterstitialAdClose(object sender, EventArgs args) { Debug.Log("**********************\n**********************\nInterstitial close"); #if UNITY_IOS AudioListener.pause = false; Time.timeScale = 1; //optional to continue the game interstitial.Destroy(); RequestInterstitial(); #endif #if UNITY_ANDROID instance.StartCoroutine(InterstitialDone()); #endif }
public void ActivatePremium() { IsPremiumUser = true; if (bannerView != null) { bannerView.Destroy(); } if (interstitialAd != null) { interstitialAd.Destroy(); } }
void InterstitialReklamAl() { if (interstitialReklam != null) { interstitialReklam.Destroy(); } interstitialReklam = new InterstitialAd(interstitialID); interstitialReklam.OnAdClosed -= InterstitialDelegate; interstitialReklam.OnAdClosed += InterstitialDelegate; AdRequest reklamiAl; if (testMod) { reklamiAl = new AdRequest.Builder().AddTestDevice(AdRequest.TestDeviceSimulator) .AddTestDevice(testDeviceID).Build(); } else { reklamiAl = new AdRequest.Builder().Build(); } interstitialReklam.LoadAd(reklamiAl); }
private void DestroyInterstitial() { if (interstitial != null) { interstitial.Destroy(); } }
public void HandleOnAdClosed(object sender, EventArgs args) { interstitial.Destroy(); interstitial.OnAdClosed -= HandleOnAdClosed; interstitial.OnAdLoaded -= HandleOnAdLoaded; }
private void FowardOnClose(object sender, EventArgs args) { mInterstitialAD.Destroy(); mInterstitialAD = new InterstitialAd(mInterstitialAD_Key); AddFowardBannerEvent(); mInterstitialAD.LoadAd(request); }
public void HideInterstitial() { if (interstitial.IsLoaded()) { interstitial.Destroy(); } }
/// <summary> /// Destroy an interstitial ad and invoke the InterstitialAdCompleted event. /// </summary> /// Called in HandleAdMobInterstitialClosed event handler. private void CloseInterstititlaAd(AdPlacement placement) { if (placement == AdPlacement.Default) // Default interstitial ad... { // Note: On iOS, InterstitialAd objects are one time use objects. // ==> Destroy the used interstitial ad object; also reset // the reference to force new objects to be created when loading ads. if (mDefaultInterstitialAd != null) { mDefaultInterstitialAd.Destroy(); mDefaultInterstitialAd = null; } } else // Custom interstitial ad... { if (mCustomInterstitialAds != null && mCustomInterstitialAds.ContainsKey(placement) && mCustomInterstitialAds[placement] != null) { mCustomInterstitialAds[placement].Destroy(); mCustomInterstitialAds[placement] = null; } } // Make sure the event is raised on main thread. RuntimeHelper.RunOnMainThread(() => { OnInterstitialAdCompleted(placement); }); }
public void RequestInterstitial() { #if UNITY_ANDROID string adUnitId = Android_Interstitial; #elif UNITY_IPHONE string adUnitId = ios_Interstitial; #else string adUnitId = "unexpected_platform"; #endif if (is_close_interstitial == true) { interstitial.Destroy(); } // Initialize an InterstitialAd. interstitial = new InterstitialAd(adUnitId); // Create an empty ad request. request = new AdRequest.Builder().Build(); // Load the interstitial with the request. interstitial.LoadAd(request); interstitial.OnAdClosed += HandleAdClosed; is_close_interstitial = false; }
private void OnTriggerEnter(Collider other) { Time.timeScale = 0; if (interstitial.IsLoaded()) { interstitial.Show(); interstitial.Destroy(); } if (other.name == "Player") { if (PlayerPrefs.GetInt("HighestLvl") >= lvl) { Destroy(gameObject); SceneManager.LoadScene("Level Select"); } else if (PlayerPrefs.GetInt("HighestLvl", 0) < lvl) { PlayerPrefs.SetInt("HighestLvl", lvl); Destroy(gameObject); EndScreen.SetActive(true); } } }
void RequestInterstitial() { if (interstitial != null) { interstitial.Destroy(); } interstitial = new InterstitialAd(interstitial_ID); // Called when an ad request has successfully loaded. this.interstitial.OnAdLoaded += HandleOnAdLoaded; // Called when an ad request failed to load. this.interstitial.OnAdFailedToLoad += HandleOnAdFailedToLoad; // Called when an ad is shown. this.interstitial.OnAdOpening += HandleOnAdOpened; // Called when the ad is closed. this.interstitial.OnAdClosed += HandleOnAdClosed; // Called when the ad click caused the user to leave the application. this.interstitial.OnAdLeavingApplication += HandleOnAdLeavingApplication; AdRequest adRequest; if (!isTesting) { adRequest = new AdRequest.Builder().Build(); } else //FOR TESTING { adRequest = new AdRequest.Builder().AddTestDevice("2077ef9a63d2b398840261c8221a0c9b").Build(); } interstitial.LoadAd(adRequest); }
public void RequestInterstitial() { #if UNITY_ANDROID string adUnitId = Android_Interstitial; #elif UNITY_IPHONE string adUnitId = ios_Interstitial; #else string adUnitId = "unexpected_platform"; #endif if (is_close_interstitial == true) { _interstitial.Destroy(); } // Initialize an InterstitialAd. _interstitial = new InterstitialAd(adUnitId); // Create an empty ad request. AdRequest request = new AdRequest.Builder().AddTestDevice("").Build(); // Load the interstitial with the request. _interstitial.LoadAd(request); my.tirasi_ok = 0; is_close_interstitial = false; }
private void RequestInterstitial() { string adUnitID; #if UNITY_ANDROID adUnitID = inter_ADR_ID; #elif UNITY_IPHONE adUnitID = inter_IOS_ID; #endif if (interstitial != null) { interstitial.Destroy(); } interstitial = new InterstitialAd(adUnitID); // Called when an ad request has successfully loaded. this.interstitial.OnAdLoaded += HandleOnAdLoaded; // Called when an ad request failed to load. this.interstitial.OnAdFailedToLoad += HandleOnAdFailedToLoad; // Called when an ad is shown. this.interstitial.OnAdOpening += HandleOnAdOpened; // Called when the ad is closed. this.interstitial.OnAdClosed += HandleOnAdClosed; // Called when the ad click caused the user to leave the application. this.interstitial.OnAdLeavingApplication += HandleOnAdLeavingApplication; AdRequest request = new AdRequest.Builder().Build(); interstitial.LoadAd(request); }
public void ClearInadsAdmob() { if (interstitial != null) { interstitial.Destroy(); } }
public void close() { if (interstitial != null) { interstitial.Destroy(); } }
private void ShowAds() { interstitial.Show(); interstitial.Destroy(); RequestInterstitial(); timeShowAds = 0; }
public void destroyInterstitailAd() { if (PlayerPrefs.GetInt("Removeads", 0) == 0) { myInterstitialAd.Destroy(); } }
public void RequestInterstitial() { if (interAd != null) { interAd.Destroy(); } interAd = new InterstitialAd(interstitialAdID); // Called when an ad request has successfully loaded. interAd.OnAdLoaded += HandleInterstitialLoaded; // Called when an ad request failed to load. interAd.OnAdFailedToLoad += HandleInterstitialFailedToLoad; // Called when an ad is clicked. interAd.OnAdOpening += HandleInterstitialOpened; // Called when the user returned from the app after an ad click. interAd.OnAdClosed += HandleInterstitialClosed; // Called when the ad click caused the user to leave the application. interAd.OnAdLeavingApplication += HandleInterstitialLeftApplication; //AdRequest request = new AdRequest.Builder().Build(); //for testing AdRequest request = new AdRequest.Builder().AddTestDevice("2077ef9a63d2b398840261c8221a0c9b").Build(); interAd.LoadAd(request); }