Beispiel #1
0
    public override void Show(AdsElement type)
    {
        if (!AdsController.NoAds)
        {
            switch (type.type)
            {
            case AdsType.Interstitial:
                HZShowOptions showOptions = new HZShowOptions();
                showOptions.Tag = type.name;
                HZInterstitialAd.ShowWithOptions(showOptions);
                break;

            case AdsType.Video:
                HZShowOptions showOptionsVideo = new HZShowOptions();
                showOptionsVideo.Tag = type.name;
                HZVideoAd.ShowWithOptions(showOptionsVideo);
                break;

            case AdsType.RewardedVideo:
                HZIncentivizedShowOptions showOptionsReward = new HZIncentivizedShowOptions();
                showOptionsReward.Tag = type.name;
                HZIncentivizedAd.ShowWithOptions(showOptionsReward);
                break;
            }
        }
    }
Beispiel #2
0
        public void ShowIntersitital(string tag)
        {
                        #if API_ADS_HEYZAP
            HZShowOptions options = new HZShowOptions();
            options.Tag = tag;

            HZInterstitialAd.ShowWithOptions(options);
            HZInterstitialAd.Fetch(tag);                // TODO: do we really need this?
                        #endif
        }
 private void ShowVideo()
 {
     // Later, such as after a level is completed
     if (HZVideoAd.IsAvailable("video"))
     {
         HZShowOptions showOptions = new HZShowOptions();
         showOptions.Tag = "video";
         HZVideoAd.ShowWithOptions(showOptions);
         VideoAdCointer = 0;
         Defs.MuteSounds(true);
     }
 }
Beispiel #4
0
        public void ShowVideoAd(string tag)
        {
            if (HZVideoAd.IsAvailable(tag) && canShowAd && !adsRemoved)
            {
                Toaster.ShowDebugToast("Showing Video ad for tag; " + tag);

                HZShowOptions options = new HZShowOptions();
                options.Tag = tag;
                HZVideoAd.ShowWithOptions(options);
            }
            else
            {
                Toaster.ShowDebugToast("Can't show Video ad for tag; " + tag);
            }
        }
Beispiel #5
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 #6
0
    public void ShowButton()
    {
        string tag = this.adTag();

        HZShowOptions showOptions = new HZShowOptions();

        showOptions.Tag = tag;

        HZIncentivizedShowOptions incentivizedOptions = new HZIncentivizedShowOptions();

        incentivizedOptions.Tag = tag;
        incentivizedOptions.IncentivizedInfo = "test app incentivized info!";

        HZBannerShowOptions bannerOptions = new HZBannerShowOptions();

        bannerOptions.Tag      = tag;
        bannerOptions.Position = this.bannerPosition;

        HZOfferWallShowOptions offerwallOptions = new HZOfferWallShowOptions();

        offerwallOptions.ShouldCloseAfterFirstClick = offerwallCloseOnFirstClickToggle.isOn;
        offerwallOptions.Tag = tag;

        this.console.Append("Showing " + this.SelectedAdType.ToString() + " with tag: " + tag);
        switch (this.SelectedAdType)
        {
        case AdType.Interstitial:
            HZInterstitialAd.ShowWithOptions(showOptions);
            break;

        case AdType.Video:
            HZVideoAd.ShowWithOptions(showOptions);
            break;

        case AdType.Incentivized:
            HZIncentivizedAd.ShowWithOptions(incentivizedOptions);
            break;

        case AdType.Banner:
            HZBannerAd.ShowWithOptions(bannerOptions);
            break;

        case AdType.Offerwall:
            HZOfferWallAd.ShowWithOptions(offerwallOptions);
            break;
        }
    }
 protected override void InternalShowInterstitialAd(AdPlacement placement)
 {
     #if EM_HEYZAP
     if (placement == AdPlacement.Default)
     {
         HZInterstitialAd.Show();
     }
     else
     {
         var options = new HZShowOptions()
         {
             Tag = ToHeyzapAdTag(placement)
         };
         HZInterstitialAd.ShowWithOptions(options);
     }
     #endif
 }