コード例 #1
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();
     }
 }
コード例 #2
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();
     }
 }
コード例 #3
0
 void ShowAdGameOver()
 {
     if (HZInterstitialAd.IsAvailable("GameOver"))
     {
         //HZShowOptions showOptions = new HZShowOptions();
         //showOptions.Tag = "GameOver";
         //HZInterstitialAd.ShowWithOptions(showOptions);
         HZInterstitialAd.Show();
     }
 }
コード例 #4
0
 public void heyzapShow()
 {
     if (PlayerPrefs.GetInt("Removeads", 0) == 0)
     {
             #if !UNITY_EDITOR
         HZInterstitialAd.Show();
         HZInterstitialAd.Fetch();
             #endif
     }
 }
コード例 #5
0
 public void ShowInterstitialAd()
 {
     if (HZInterstitialAd.IsAvailable())
     {
         HZInterstitialAd.Show();
     }
     else
     {
         UnityAdsController.instance.ShowUnityinterstitialAd();
     }
 }
コード例 #6
0
 public void ShowInterstitialAd()
 {
     if (canShowAd && !adsRemoved && HZInterstitialAd.IsAvailable())
     {
         Toaster.ShowDebugToast("Showing Interstitial ad");
         HZInterstitialAd.Show();
     }
     else
     {
         Toaster.ShowDebugToast("Cant show Interstitial ad");
     }
 }
コード例 #7
0
 public void ShowInterstitialAd()
 {
     if (HZInterstitialAd.IsAvailable() && AdChecker)
     {
         HZInterstitialAd.Show();
         AdChecker = false;
     }
     else if (AdChecker)
     {
         AdChecker = false;
         UnityAdsController.instance.ShowUniytinterstitialAd();
     }
 }
コード例 #8
0
 void ShowAdMenu()
 {
     if (HZInterstitialAd.IsAvailable("MainMenu"))
     {
         if (!showOnce)
         {
             //HZShowOptions showOptions = new HZShowOptions();
             //showOptions.Tag = "MainMenu";
             //HZInterstitialAd.ShowWithOptions(showOptions);
             HZInterstitialAd.Show();
         }
         showOnce = true;
     }
 }
コード例 #9
0
ファイル: HeyzapClientImpl.cs プロジェクト: akil03/bx
 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
 }
コード例 #10
0
 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
 }
コード例 #11
0
ファイル: Game.cs プロジェクト: gbdb71/Unity3D-Soccer-Game
    IEnumerator End(float waitTime)
    {
        gameEnded = true;
        audioWhistle2.Play();

        player.gameEnded   = true;
        opponent.gameEnded = true;

        data.GetComponent <Data>().playerScore = pScore;
        data.GetComponent <Data>().oppScore    = oScore;

        yield return(new WaitForSeconds(waitTime));

        //
        // Show AD
        //
        if (Random.Range(0, 10) >= 2)
        {
            if (HZVideoAd.IsAvailable())
            {
                HZVideoAd.Show();
            }
            else
            {
                HZInterstitialAd.Show();
            }
        }
        else
        {
            HZInterstitialAd.Show();
        }

        // Show Menu
        menuBtn.SetActive(true);
        rematchBtn.SetActive(true);

        //
        // AD cache
        //
        StartCoroutine(AdCache(0.1F));
    }
コード例 #12
0
    void ShowGO()
    {
        homePanel.gameObject.SetActive(false);
        gameOverPanel.gameObject.SetActive(true);
        gameHintPanel.gameObject.SetActive(false);
        inGamePanel.gameObject.SetActive(false);

        if (Main.Instance.totalGames % 3 == 0 && Main.Instance.totalGames > 1)
        {
            if (!Main.Instance.isNoads)
            {
                HZInterstitialAd.Show();
            }
        }

        UniRate.Instance.LogEvent(true);
//		if(Main.Instance.totalGames == 13)
//		{
//			OnPromptedForRating();
//		}
    }
コード例 #13
0
    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;
        }
    }
コード例 #14
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");
 }
コード例 #15
0
 public void showHeyZapAds()
 {
     if (PlayerPrefs.HasKey("HeyZadAdcount"))
     {
         if (PlayerPrefs.GetInt("HeyZadAdcount") == 3)
         {
             HZInterstitialAd.Show();
             PlayerPrefs.SetInt("HeyZadAdcount", 0);
         }
         else
         {
             if (HZVideoAd.IsAvailable())
             {
                 HZVideoAd.Show();
             }
             PlayerPrefs.SetInt("HeyZadAdcount", PlayerPrefs.GetInt("HeyZadAdcount") + 1);
         }
     }
     else
     {
         PlayerPrefs.SetInt("HeyZadAdcount", 0);
     }
 }
コード例 #16
0
ファイル: AdsManager.cs プロジェクト: zmer007/noodleadstest
 public void ShowInterstitial()
 {
     HZInterstitialAd.Show();
 }
コード例 #17
0
ファイル: GameOver.cs プロジェクト: taocong810/WordSearch
    // Use this for initialization
    void Start()
    {
        settingPanel.transform.gameObject.SetActive(false);
        if (GameData.gameMode == EGameMode.TutorialMode)
        {
            tutorialTitleText.text = "Tutorial puzzle completed";
            //			noOfDiamonds = 1;
            tutorialResultPanel.gameObject.SetActive(true);
        }
        else
        {
            MainDriver.Instance.gameCount++;
            puzzleName.text = GameData.gamePuzzleName;

            if (GameData.gameMode == EGameMode.FullMode)
            {
                diamondInfoPanel.gameObject.SetActive(true);
                diamondIcon.gameObject.SetActive(true);
                if (GameData.isTimeChallenge)
                {
                    //Time challnege
                    gameTimeLabel.text = "GAME TIME";
                    bestTimeLabel.text = "GIVEN TIME";

                    if (GameData.isChallengeCompleted)
                    {
                        noOfDiamonds = 1;
                        MainDriver.Instance.puzzleSolved++;
                        timeTaken.text = String.Format("{0:D2} : {1:D2}", GameData.timeTaken / 60, GameData.timeTaken % 60);
                        int timeChallengeReward = 1;
                        int totalKeys           = PlayerPrefs.GetInt(Constants.KEY_CURRENT_DIAMONDS, 0);
                        PlayerPrefs.SetInt(Constants.KEY_CURRENT_DIAMONDS, totalKeys + 1);
                        diamondEarnedText.text = "Time challenge completed";
                        rewardText.text        = timeChallengeReward + " DIAMOND";
                        rewardPanel.gameObject.SetActive(true);

                        if (!MainDriver.Instance.questChecker.QUEST_FIRST_PUZZLE)
                        {
                            PlayerPrefs.SetBool(Constants.QUEST_FIRST_PUZZLE, true);
                            MainDriver.Instance.questChecker.UpdateQuestStatus();
                            MainDriver.Instance.PostAchievement(Constants.QUEST_FIRST_PUZZLE_ID);
                            MainDriver.Instance.AwardDiamonds(Constants.QUEST_AWARD);
                        }
                    }
                    else
                    {
                        timeTaken.text = "Time Up";
                        //Failed Time challenge
                        if (GameData.timeLimit == 60)
                        {
                            diamondEarnedText.text = "1 Min challenge failed";
                        }
                        else if (GameData.timeLimit == 75)
                        {
                            diamondEarnedText.text = "1:15 Min challenge failed";
                        }
                        else if (GameData.timeLimit == 90)
                        {
                            diamondEarnedText.text = "1:30 Min challenge failed";
                        }
                    }
                    resultPanel.gameObject.SetActive(true);
                }
                else
                {
                    MainDriver.Instance.puzzleSolved++;
                    //Normal game
                    gameTimeLabel.text = "GAME TIME";
                    bestTimeLabel.text = "BEST TIME";
                    timeTaken.text     = String.Format("{0:D2} : {1:D2}", GameData.timeTaken / 60, GameData.timeTaken % 60);
                    noOfDiamonds       = GetDiamondForSeconds(GameData.timeTaken);
                    if (noOfDiamonds == 1)
                    {
//						if(MainDriver.Instance.puzzleSolved == 1)
                        if (!MainDriver.Instance.questChecker.QUEST_FIRST_PUZZLE)
                        {
                            //							diamondEarnedText.text =  "First puzzle reward "+ noOfDiamonds + " Diamond";
                            diamondEarnedText.text = "You have got " + noOfDiamonds + " Diamond";
                            tutorialTitleText.text = "First puzzle completed";
                            tutorialResultPanel.gameObject.SetActive(true);

                            PlayerPrefs.SetBool(Constants.QUEST_FIRST_PUZZLE, true);
                            MainDriver.Instance.questChecker.UpdateQuestStatus();
                            MainDriver.Instance.PostAchievement(Constants.QUEST_FIRST_PUZZLE_ID);
                            MainDriver.Instance.AwardDiamonds(Constants.QUEST_AWARD);
                        }
                        else
                        {
                            diamondEarnedText.text = "You have got " + noOfDiamonds + " Diamond";
                            resultPanel.gameObject.SetActive(true);
                            rewardPanel.gameObject.SetActive(true);
                        }
                    }
                    else
                    {
                        diamondEarnedText.text = "Finish puzzle under 2 Min to get a Diamond";
                        resultPanel.gameObject.SetActive(true);
                    }

//					if(!MainDriver.Instance.questChecker.QUEST_FIRST_PUZZLE)
//					{
//						PlayerPrefs.SetBool(Constants.QUEST_FIRST_PUZZLE, true);
//						MainDriver.Instance.questChecker.UpdateQuestStatus();
//						MainDriver.Instance.PostAchievement(Constants.QUEST_FIRST_PUZZLE_ID);
//						MainDriver.Instance.AwardDiamonds(Constants.QUEST_AWARD);
//					}
                }
            }
            else
            {
                //Kids mode
                MainDriver.Instance.puzzleSolved++;
                diamondInfoPanel.gameObject.SetActive(false);
                timeTaken.text = String.Format("{0:D2} : {1:D2}", GameData.timeTaken / 60, GameData.timeTaken % 60);
                diamondIcon.gameObject.SetActive(false);
                diamondEarnedText.text = "";
                resultPanel.gameObject.SetActive(true);
            }


            SaveLevelData();
            if (MainDriver.Instance.gameCount > 3)
            {
                HZInterstitialAd.Show();
            }

            MainDriver.Instance.PostScoreToLeaderBoard();
            UniRate.Instance.LogEvent(true);
        }
    }