Example #1
0
 public void showRewardVideo()
 {
     if (HZIncentivizedAd.IsAvailable())
     {
         HZIncentivizedAd.Show();
     }
 }
Example #2
0
    public void showHZRewardedAdVideos()
    {
//		if (GameData.Instance.multiRemainingGameCount <= 0) {

//			if (GameData.Instance.rewardedGameCount >= GameData.Instance.dailyLimit * 5) {

//				requestUTCTimeFromServer ();

//				GameData.Instance.rewardedGameCount = 0;
//				GameData.Instance.Save ();
//
//				string message = "Unfortunately your credit limit exeeded. 4 hours later you can gain credit watching rewarded videos. You can gain more credits by purchasing game packages from the shopping list";
//				dialogueManager = DialogueManager.Instance ();
//				dialogueManager.showDialog ("Info",message, 0);

//				return;
//			}

        if (HZIncentivizedAd.IsAvailable())
        {
            HZIncentivizedAd.Show();
        }

        HZIncentivizedAd.Fetch();

//		} else {

//			string message = "Please try again when your credit runs out. In case of no credits left you can gain again";
//			dialogueManager = DialogueManager.Instance ();
//			dialogueManager.showDialog ("Info",message, 0);
//		}
    }
Example #3
0
 public void ShowRewarded()
 {
     if (HZIncentivizedAd.IsAvailable())
     {
         HZIncentivizedAd.Show();
     }
 }
Example #4
0
 /// <summary>
 /// Show Heyzap rewarded video
 /// </summary>
 /// <param name="CompleteMethod">callback called when user closes the rewarded video -> if true, video was not skipped</param>
 public void ShowRewardVideo(UnityAction <bool> CompleteMethod)
 {
     if (HZIncentivizedAd.IsAvailable())
     {
         OnCompleteMethod = CompleteMethod;
         HZIncentivizedAd.Show();
     }
 }
Example #5
0
 /// <summary>
 /// Show Heyzap rewarded video
 /// </summary>
 /// <param name="CompleteMethod">callback called when user closes the rewarded video -> if true, video was not skipped</param>
 public void ShowRewardVideo(UnityAction <bool, string> CompleteMethod)
 {
     if (HZIncentivizedAd.IsAvailable())
     {
         OnCompleteMethodWithAdvertiser = CompleteMethod;
         HZIncentivizedAd.Show();
     }
 }
Example #6
0
 public void RewardVideo()
 {
     Main.Instance.PlayButtonSound();
     if (HZIncentivizedAd.IsAvailable())
     {
         HZIncentivizedAd.Show();
     }
 }
Example #7
0
 private static bool PlayHeyzapIncentivizedAd()
 {
     if (HZIncentivizedAd.IsAvailable())
     {
         HZIncentivizedAd.Show();
         HZIncentivizedAd.Fetch();
         return(true);
     }
     return(false);
 }
Example #8
0
 public void GetShards()
 {
     if (HZIncentivizedAd.IsAvailable())
     {
         HZIncentivizedAd.Show();
         PlayerPrefs.SetInt("currentShards", PlayerPrefs.GetInt("currentShards") + 5);
         MoreShards.SetActive(false);
         MapPanel.SetActive(true);
     }
 }
Example #9
0
 public void ContinueYES()
 {
     isReviveBreaked = true;
     CancelInvoke("CntDown");
     StopCoroutine(Timer());
     Main.Instance.PlayButtonClickSound();
     if (HZIncentivizedAd.isAvailable())
     {
         HZIncentivizedAd.Show();
     }
 }
Example #10
0
        public void ShowRewardAd()
        {
            if (HZIncentivizedAd.IsAvailable())
            {
                Toaster.ShowDebugToast("Showing reward ad.");

                HZIncentivizedAd.Show();
            }
            else
            {
                Toaster.ShowDebugToast("Can't show reward ad");
            }
        }
Example #11
0
 public void ShowIncentivezedAds()
 {
     if (HZIncentivizedAd.IsAvailable())
     {
         HZIncentivizedAd.Show();
         ShowIncentiveAds();
     }
     else
     {
         HZIncentivizedAd.Fetch();
         UnityAdsController.instance.ShowUnityRewardedAd();
     }
 }
Example #12
0
    public void WatchVideo()
    {
        if (GameData.isMusicON)
        {
            MainDriver.Instance.PlayButtonSound();
        }

        if (MainDriver.Instance.shallShowVideo)
        {
            if (HZIncentivizedAd.IsAvailable())
            {
                HZIncentivizedAd.Show();
            }
        }
    }
Example #13
0
 public void ShowRewardedAd(AdLocation location)
 {
     #if EM_HEYZAP
     if (HZIncentivizedAd.IsAvailable())
     {
         HZIncentivizedAd.Show();
     }
     else
     {
         Debug.Log("Could not show Heyzap rewarded ad: ad is not loaded.");
     }
     #else
     Debug.LogError(NO_SDK_MESSAGE);
     #endif
 }
 public void ShowIncentivezedAd()
 {
     if (HZIncentivizedAd.IsAvailable() && AdChecker)
     {
         AdChecker = false;
         HZIncentivizedAd.Show();
     }
     else if (AdChecker)
     {
         AdChecker = false;
         HZIncentivizedAd.Fetch();
         UnityAdsController.instance.ShowUnityRewardedAd();
     }
     ShowIncentiveAds();
 }
Example #15
0
 public void x2VideoButtonHandler()
 {
     if (!x2VideoButtonPressed)
     {
         if (HZIncentivizedAd.IsAvailable())
         {
             oneGameMoney        *= 2;
             gameOverMoney.text   = oneGameMoney.ToString();
             x2VideoButtonPressed = true;
             HZIncentivizedAd.Show();
         }
         else
         {
         }
     }
 }
Example #16
0
 protected override void InternalShowRewardedAd(AdPlacement placement)
 {
     #if EM_HEYZAP
     if (placement == AdPlacement.Default)
     {
         HZIncentivizedAd.Show();
     }
     else
     {
         var options = new HZIncentivizedShowOptions()
         {
             Tag = ToHeyzapAdTag(placement)
         };
         HZIncentivizedAd.ShowWithOptions(options);
     }
     #endif
 }
Example #17
0
    public void RewardedWepSlot(int slot)
    {
#if UNITY_EDITOR
        saveData.AwardSlot(slot);
#endif

#if UNITY_ANDROID
        if (HZIncentivizedAd.IsAvailable())
        {
            HZIncentivizedAd.Show();
            Analytics.CustomEvent("SlotVideo");
            saveData.AwardSlot(slot);
        }

        HZIncentivizedAd.Fetch();
#endif
    }
Example #18
0
    public void showHZAdVideos()
    {
        googleAnalytics.LogEvent(new EventHitBuilder()
                                 .SetEventCategory("game_action")
                                 .SetEventAction("heyzap_advideos")
                                 .SetEventLabel("video"));

        if (HZIncentivizedAd.IsAvailable())
        {
            HZIncentivizedAd.Show();
        }

        HZIncentivizedAd.Fetch();

//		// Later, such as after a level is completed
//		if (HZVideoAd.IsAvailable()) {
//			HZVideoAd.Show();
//			HZVideoAd.Fetch();
//		}
    }
Example #19
0
    public void RewardedAmmo()

    {
#if UNITY_EDITOR
        weapons.giveAmmo(weapons.weaponToAddAmmo);
        pause.DeactivateAmmoCanvas();
        fpsPlayerRef.ActivateADShield(3.0f);
#endif

#if UNITY_ANDROID
        if (HZIncentivizedAd.IsAvailable())
        {
            HZIncentivizedAd.Show();
            weapons.giveAmmo(weapons.weaponToAddAmmo);
            Analytics.CustomEvent("AmmoVideo");
            pause.DeactivateAmmoCanvas();
            fpsPlayerRef.ActivateADShield(3.0f);
            HZIncentivizedAd.Fetch();
        }
#endif
    }
Example #20
0
    public void Rewarded()
    {
                #if UNITY_EDITOR
        fpsPlayerRef.hitPoints = fpsPlayerRef.maximumHitPoints;
        fpsPlayerRef.UpdateHPBar();
        fpsPlayerRef.invulnerable = true;
        if (resetPositionInDeath)
        {
            fpsPlayerTransform.position = originalPosition;
            fpsPlayerTransform.rotation = originalRotation;
            resetPositionInDeath        = false;
        }
        pause.DeactivateDeathCanvas();
        fpsPlayerRef.RemoveInvulnerability();
        fpsPlayerRef.ActivateADShield(5.0f);
        #endif


#if UNITY_ANDROID
        if (HZIncentivizedAd.IsAvailable())
        {
            HZIncentivizedAd.Show();
            fpsPlayerRef.invulnerable = true;
            fpsPlayerRef.hitPoints    = fpsPlayerRef.maximumHitPoints;
            fpsPlayerRef.UpdateHPBar();
            Analytics.CustomEvent("DeathVideo");
            if (resetPositionInDeath)
            {
                fpsPlayerTransform.position = originalPosition;
                fpsPlayerTransform.rotation = originalRotation;
                resetPositionInDeath        = false;
            }
            pause.DeactivateDeathCanvas();
            fpsPlayerRef.RemoveInvulnerability();
            fpsPlayerRef.ActivateADShield(5.0f);
            HZIncentivizedAd.Fetch();
        }
#endif
    }