Beispiel #1
0
    public void IsAvailableButton()
    {
        string tag       = this.adTag();
        bool   available = false;

        switch (this.SelectedAdType)
        {
        case AdType.Interstitial:
            available = HZInterstitialAd.IsAvailable(tag);
            break;

        case AdType.Video:
            available = HZVideoAd.IsAvailable(tag);
            break;

        case AdType.Incentivized:
            available = HZIncentivizedAd.IsAvailable(tag);
            break;

        case AdType.Banner:
            // Not applicable
            break;

        case AdType.Offerwall:
            available = HZOfferWallAd.IsAvailable(tag);
            break;
        }

        string availabilityMessage = available ? "available" : "not available";

        this.console.Append(this.SelectedAdType.ToString() + " with tag: " + tag + " is " + availabilityMessage);
    }
Beispiel #2
0
 /// <summary>
 /// Show Heyzap interstitial
 /// </summary>
 /// <param name="InterstitialClosed">callback called when user closes interstitial</param>
 public void ShowInterstitial(UnityAction InterstitialClosed)
 {
     if (HZInterstitialAd.IsAvailable())
     {
         OnInterstitialClosed = InterstitialClosed;
         HZInterstitialAd.Show();
     }
 }
Beispiel #3
0
 /// <summary>
 /// Show Heyzap interstitial
 /// </summary>
 /// <param name="InterstitialClosed">callback called when user closes interstitial</param>
 public void ShowInterstitial(UnityAction <string> InterstitialClosed)
 {
     if (HZInterstitialAd.IsAvailable())
     {
         OnInterstitialClosedWithAdvertiser = InterstitialClosed;
         HZInterstitialAd.Show();
     }
 }
Beispiel #4
0
 public bool IsInterstitialAdReady(AdLocation location)
 {
     #if EM_HEYZAP
     return(HZInterstitialAd.IsAvailable());
     #else
     return(false);
     #endif
 }
Beispiel #5
0
 void ShowAdGameOver()
 {
     if (HZInterstitialAd.IsAvailable("GameOver"))
     {
         //HZShowOptions showOptions = new HZShowOptions();
         //showOptions.Tag = "GameOver";
         //HZInterstitialAd.ShowWithOptions(showOptions);
         HZInterstitialAd.Show();
     }
 }
 public void ShowInterstitialAd()
 {
     if (HZInterstitialAd.IsAvailable())
     {
         HZInterstitialAd.Show();
     }
     else
     {
         UnityAdsController.instance.ShowUnityinterstitialAd();
     }
 }
Beispiel #7
0
 public void ShowInterstitialAd()
 {
     if (canShowAd && !adsRemoved && HZInterstitialAd.IsAvailable())
     {
         Toaster.ShowDebugToast("Showing Interstitial ad");
         HZInterstitialAd.Show();
     }
     else
     {
         Toaster.ShowDebugToast("Cant show Interstitial ad");
     }
 }
 public void Levelquit()
 {
             #if !UNITY_EDITOR
     if (PlayerPrefs.GetInt("Removeads", 0) == 0)
     {
         if (HZInterstitialAd.IsAvailable())
         {
             heyzapShow();
         }
     }
             #endif
 }
Beispiel #9
0
 public void ShowInterstitialAd()
 {
     if (HZInterstitialAd.IsAvailable() && AdChecker)
     {
         HZInterstitialAd.Show();
         AdChecker = false;
     }
     else if (AdChecker)
     {
         AdChecker = false;
         UnityAdsController.instance.ShowUniytinterstitialAd();
     }
 }
Beispiel #10
0
 void ShowAdMenu()
 {
     if (HZInterstitialAd.IsAvailable("MainMenu"))
     {
         if (!showOnce)
         {
             //HZShowOptions showOptions = new HZShowOptions();
             //showOptions.Tag = "MainMenu";
             //HZInterstitialAd.ShowWithOptions(showOptions);
             HZInterstitialAd.Show();
         }
         showOnce = true;
     }
 }
 protected override bool InternalIsInterstitialAdReady(AdPlacement placement)
 {
     #if EM_HEYZAP
     if (placement == AdPlacement.Default)
     {
         return(HZInterstitialAd.IsAvailable());
     }
     else
     {
         return(HZInterstitialAd.IsAvailable(ToHeyzapAdTag(placement)));
     }
     #else
     return(false);
     #endif
 }
Beispiel #12
0
        public void ShowInterstitialAd(string tag)
        {
            if (canShowAd && !adsRemoved && HZInterstitialAd.IsAvailable(tag))
            {
                Toaster.ShowDebugToast("Showing Interstitial for tag; " + tag);

                HZShowOptions options = new HZShowOptions();
                options.Tag = tag;
                HZInterstitialAd.ShowWithOptions(options);
            }
            else
            {
                Toaster.ShowDebugToast("Can't show Interstitial for tag; " + tag);
            }
        }
Beispiel #13
0
 public void ShowInterstitialAd(AdLocation location)
 {
     #if EM_HEYZAP
     if (HZInterstitialAd.IsAvailable())
     {
         HZInterstitialAd.Show();
     }
     else
     {
         Debug.Log("Could not show Heyzap interstitial ad: ad is not loaded.");
     }
     #else
     Debug.LogError(NO_SDK_MESSAGE);
     #endif
 }
    //  ******************************  priority ads ***************************************************


    public void levelfailed()
    {
                #if !UNITY_EDITOR
        if (PlayerPrefs.GetInt("Removeads", 0) == 0)
        {
            if (HZInterstitialAd.IsAvailable())
            {
                heyzapShow();
                InitHeyzap();
            }
            else if (Advertisement.IsReady())
            {
                Advertisement.Show();
                InitUnityadd();
            }
        }
                #endif
    }
Beispiel #15
0
    public override bool IsAvilable(AdsElement type)
    {
        if (!AdsController.NoAds)
        {
            switch (type.type)
            {
            case AdsType.Interstitial:
                HZInterstitialAd.IsAvailable(type.name);
                break;

            case AdsType.Video:
                HZVideoAd.IsAvailable(type.name);
                break;

            case AdsType.RewardedVideo:
                HZIncentivizedAd.IsAvailable(type.name);
                break;
            }
        }
        return(false);
    }
    private void ShowInterstitial()
    {
        ++_counter;
        if (_counter >= Umbrella.ServerSettings.Manager.Get <Int64>("interstitialFrequency", 5))
        {
            // show ad
            _counter = 0;
        }
        else
        {
            return;
        }
        if (HZInterstitialAd.IsAvailable(/*"app-launch"*/))
        {
//			HZShowOptions showOptions = new HZShowOptions();
//			showOptions.Tag = "app-launch";
//			HZInterstitialAd.ShowWithOptions(showOptions);
            HZInterstitialAd.Show();

            _firstInterstitialShowed = true;
        }
    }
Beispiel #17
0
 // Token: 0x06000CBB RID: 3259 RVA: 0x00050438 File Offset: 0x0004E838
 public void PlayLevel()
 {
     this.Play_ButtonClickSound();
     gameplay.startCrazyLevel = false;
     this.resetButton.SetActive(false);
     for (int i = 0; i < this.menuButtons.Length; i++)
     {
         this.menuButtons[i].SetActive(false);
     }
     if (Application.platform == RuntimePlatform.Android && !Application.isEditor)
     {
         if (Advertisement.IsReady())
         {
             Advertisement.Show();
         }
         else if (HZInterstitialAd.IsAvailable())
         {
             HZInterstitialAd.Show();
         }
     }
     Application.LoadLevel("InAppPurchase");
 }
Beispiel #18
0
 /// <summary>
 /// Check if Heyzap interstitial is available
 /// </summary>
 /// <returns>true if an interstitial is available</returns>
 public bool IsInterstitialAvailable()
 {
     return(HZInterstitialAd.IsAvailable());
 }