Esempio n. 1
0
 void AdFinished(UnityEngine.Monetization.ShowResult result)
 {
     if (result == UnityEngine.Monetization.ShowResult.Finished && rewarder != null)
     {
         rewarder(false);
     }
 }
Esempio n. 2
0
 void AdFinished(UnityEngine.Monetization.ShowResult result)
 {
     if (result == UnityEngine.Monetization.ShowResult.Finished)
     {
         GameManager.instance.AddCoins(reward);
     }
 }
Esempio n. 3
0
 void afterAdLoad(UnityEngine.Monetization.ShowResult r)
 {
     if (loader != null && scene != null)
     {
         loader.SendMessage("loadlewel", scene);
     }
 }
 void AdFinished(ShowResult result)
 {
     if (result == ShowResult.Finished)
     {
         // Reward the player
     }
     else if (result == ShowResult.Skipped)
     {
         Debug.LogWarning("The player skipped the video - DO NOT REWARD!");
     }
     else if (result == ShowResult.Failed)
     {
         Debug.LogError("Video failed to show");
     }
 }
Esempio n. 5
0
 void RewardedAdFinished(ShowResult result)
 {
     if (result == ShowResult.Finished)
     {
         Debug.LogWarning("Finished rewarded video");
         coinManager.rewardMultiplier();
     }
     else if (result == ShowResult.Skipped)
     {
         Debug.LogWarning("The player skipped the video - DO NOT REWARD!");
     }
     else if (result == ShowResult.Failed)
     {
         Debug.LogWarning("Video failed to show");
     }
 }
Esempio n. 6
0
 void HandleModelShowResult(UnityEngine.Monetization.ShowResult result)
 {
     if (result == UnityEngine.Monetization.ShowResult.Finished)
     {
         PlayerPrefs.SetInt(instPans[selectedPanID].name, 1);
         btnBuy.gameObject.SetActive(false);
         btnSelect.gameObject.SetActive(true);
     }
     else if (result == UnityEngine.Monetization.ShowResult.Skipped)
     {
         Debug.LogWarning("The player skipped the video - DO NOT REWARD!");
     }
     else if (result == UnityEngine.Monetization.ShowResult.Failed)
     {
         Debug.LogError("Video failed to show");
     }
 }
Esempio n. 7
0
        private void RewardCallback(ShowResult result)
        {
            switch (result)
            {
            case ShowResult.Finished:
                Debug.Log("Rewarded");
                break;

            case ShowResult.Skipped:
                Debug.Log("You skipped, Bruv");
                break;

            case ShowResult.Failed:
                Debug.Log("Failed to display ad");
                break;
            }
        }
Esempio n. 8
0
        private void RewardCallback(ShowResult result)
        {
            switch (result)
            {
            case ShowResult.Finished:
                Debug.Log("Rewards for everyone!");
                break;

            case ShowResult.Skipped:
                Debug.Log("Ad skpped, no rewards.");
                break;

            case ShowResult.Failed:
                Debug.Log("Ad failed to display.");
                break;
            }
        }
    public void RewardedAdCompletionCallBack(UnityEngine.Monetization.ShowResult rewardedResult)
    {
        switch (rewardedResult)
        {
        case UnityEngine.Monetization.ShowResult.Finished:
            AdvertEngine.Instance.RewardedVideoResult(AdResult.COMPLETED);
            break;

        case UnityEngine.Monetization.ShowResult.Skipped:
            AdvertEngine.Instance.RewardedVideoResult(AdResult.FAILD);
            break;

        default:
            AdvertEngine.Instance.RewardedVideoResult(AdResult.FAILD);
            break;
        }
    }
Esempio n. 10
0
 void HandleCoinsShowResult(UnityEngine.Monetization.ShowResult result)
 {
     if (result == UnityEngine.Monetization.ShowResult.Finished)
     {
         int coins = PlayerPrefs.GetInt("Coins");
         coins += 15;
         PlayerPrefs.SetInt("Coins", coins);
         ShowCoins();
     }
     else if (result == UnityEngine.Monetization.ShowResult.Skipped)
     {
         Debug.LogWarning("The player skipped the video - DO NOT REWARD!");
     }
     else if (result == UnityEngine.Monetization.ShowResult.Failed)
     {
         Debug.LogError("Video failed to show");
     }
 }
Esempio n. 11
0
    void AdFinished(UnityEngine.Monetization.ShowResult result)
    {
        if (result == UnityEngine.Monetization.ShowResult.Finished)
        {
            //Reward the player.
            switch (m_moneyType)
            {
            case MoneyType.HEART:
                ShowRewardAnimation();
                world.AddHeart(m_rewardAmount);
                break;

            case MoneyType.CRYSTAL:
                ShowRewardAnimation();
                world.AddCrystal(m_rewardAmount);
                break;

            default:
                break;
            }
        }
    }
Esempio n. 12
0
    //広告結果イベント
    private void HandleShowResult(UnityEngine.Monetization.ShowResult result)
    //private void HandleShowResult(UnityEngine.Advertisements.ShowResult result)
    {
        switch (result)
        {
        //最後まで終了
        case UnityEngine.Monetization.ShowResult.Finished:
            suta.sutaminaplus();
            addia(1);
            break;

        //途中スキップ
        case UnityEngine.Monetization.ShowResult.Skipped:
            addia(2);
            break;

        //表示失敗
        case UnityEngine.Monetization.ShowResult.Failed:
            addia(3);
            break;
        }
    }
Esempio n. 13
0
    void checkAd(UnityEngine.Monetization.ShowResult r)
    {
        switch (r)
        {
        case UnityEngine.Monetization.ShowResult.Finished:
        {
            play.SendMessage("con");
        }
        break;

        case UnityEngine.Monetization.ShowResult.Skipped:
        {
            Fail();
        }
        break;

        case UnityEngine.Monetization.ShowResult.Failed:
        {
            Fail();
        }
        break;
        }
    }
    /**
     * 広告視聴完了時に呼ばれる関数
     * @param ShowResult result 広告視聴完了時の結果ステータス
     */
    private void OnAdFinished(ShowResult result)
    {
        switch (result)
        {
        case ShowResult.Finished:
            // 広告視聴を完了したとき
            Debug.Log("Ad Finished");
            break;

        case ShowResult.Skipped:
            // 広告視聴をスキップして完了したとき
            Debug.Log("Ad Skipped");
            break;

        case ShowResult.Failed:
            // 広告視聴が失敗したとき
            Debug.Log("Ad Failed");
            break;

        default:
            throw new ArgumentOutOfRangeException(nameof(result), result, null);
        }
    }
Esempio n. 15
0
 // When the video ad is finished, update variables
 private void VideoAdFinished(UnityEngine.Monetization.ShowResult result)
 {
     videoAdPlaying = false;
 }