Exemplo n.º 1
0
 public void UserOptToWatchAd()
 {
     if (!rewardBasedVideo.IsLoaded())
     {
         MyDelay(6);
         scorepnel.SetActive(true);
     }
     else
     {
         rewardBasedVideo.Show();
         this.RequestRewardBasedVideo();
     }
 }
Exemplo n.º 2
0
 public void ShowRewardedAd()
 {
     if (rewardedAd.IsLoaded())
     {
         rewardedAd.Show();
         Debug.Log("Test3");
         Player.credit += 100;
     }
     else
     {
         Debug.Log("rewarded ad not load");
     }
 }
Exemplo n.º 3
0
 public void ShowRewardAd()
 {
     if (!ad.IsLoaded())
     {
         LoadAd();
         ShowRewardedAd();
         //return;
     }
     else
     {
         ad.Show();
     }
 }
Exemplo n.º 4
0
        private void ShowAdvertising()
        {
            rewardBasedVideoAd = RewardBasedVideoAd.Instance;

            AdRequest adRequest = new AdRequest.Builder().AddTestDevice("2077ef9a63d2b398840261c8221a0c9b").Build();

            rewardBasedVideoAd.LoadAd(adRequest, baseRewardedVideoAdsID);

            if (rewardBasedVideoAd.IsLoaded())
            {
                rewardBasedVideoAd.Show();
            }
        }
Exemplo n.º 5
0
    private void LoadVideoAd()
    {
#if UNITY_EDITOR
        string adUnitId = "unused";
#elif UNITY_ANDROID
        string adUnitId = "ca-app-pub-5506973357467780/4430598242";
#elif UNITY_IOS
        string adUnitId = "INSERT_IOS_AD_UNIT_ID";
#else
        string adUnitId = "Unexpected Platform";
#endif
        if (!RewardedVideo.IsLoaded())
        {
            AdRequest request = new AdRequest.Builder().Build();
            RewardedVideo.LoadAd(request, adUnitId);
        }

        if (RewardedVideo.IsLoaded())
        {
            RewardedVideo.Show();
        }
    }
 public void showRewardedAd()
 {
     if (rewardedAd.IsLoaded())
     {
         Debug.Log("hryryry");
         //RewardPanel.SetActive(true);
         rewardedAd.Show();
     }
     else
     {
         Debug.Log("Reawrded ad not Loaded");
     }
 }
Exemplo n.º 7
0
 public void ShowRewardAd()
 {
     if (ad.IsLoaded())
     {
         Debug.Log("View Reward Ad");
         ad.Show();
     }
     else
     {
         Debug.Log("Reward Ad is Not Loaded");
         LoadRewardAd();
     }
 }
Exemplo n.º 8
0
 public void ShowRewarded()
 {
     BotonClicked = EventSystem.current.currentSelectedGameObject.name;
     // Manager.ShowText("Cargamos video");
     if (rewardBasedVideo.IsLoaded())
     {
         rewardBasedVideo.Show();
     }
     else
     {
         GameObject.Find("Controlador").GetComponent <ToastMessage>().crearTexto("video not loaded!!");
     }
 }
Exemplo n.º 9
0
    public void showrewardvideo()
    {
        if (rewardvideo.IsLoaded())
        {
            rewardvideo.Show();
        }
        else
        {
            Requestrewardvideo();
        }

        character.rewardbtn.gameObject.SetActive(false);
    }
 public bool ReadyVideo()
 {
     if (!initialized)
     {
         return(false);
     }
     else if (!advertVideo.IsLoaded())
     {
         OnVideoUnload(null, null);
         return(false);
     }
     return(true);
 }
Exemplo n.º 11
0
    public void Display_Video()
    {
        bool available = IronSource.Agent.isRewardedVideoAvailable();

        if (RandomNumber == 0 && available)
        {
            IronSource.Agent.showRewardedVideo();
        }
        else if (RandomNumber == 0 && rewardAd.IsLoaded())
        {
            rewardAd.Show();
        }
    }
Exemplo n.º 12
0
 public void OnBtnViewAdClicked()
 {
     if (ad.IsLoaded())
     {
         Debug.Log("View Ad");
         ad.Show();
     }
     else
     {
         Debug.Log("Ad is Not Loaded");
         LoadAd();
     }
 }
Exemplo n.º 13
0
    public void UserOptToWatchAd()
    {
        // 動画広告の読み込み成功時
        if (rewardBasedVideo.IsLoaded())
        {
#if UNITY_EDITOR
            IsRewarded = true;
            IsClosed   = true;
            rewardBasedVideo.Show();
# else
            rewardBasedVideo.Show();
#endif
        }
Exemplo n.º 14
0
 public void showRewardVideo()
 {
     if (rewardBasedVideo.IsLoaded())
     {
         rewardBasedVideo.Show();
         rewardBasedVideo.OnAdRewarded     += onRewardedVideoEvent;
         rewardBasedVideo.OnAdClosed       += onRewardedVideoSkippedEvent;
         rewardBasedVideo.OnAdFailedToLoad += onRewardedVideoFailedEvent;
     }
     else
     {
         loadRewardVideo();
     }
 }
Exemplo n.º 15
0
// hadi hia fontion li kat afficher les pub
    public void ShowRewardAd()
    {
// had fonction katjib pub 3ad bash doz tban
// khasni nkhadmha hia liwla 3ad pub tban
        //   LoadReward();
        if (rewardBasedVideoAd.IsLoaded())
        {
            rewardBasedVideoAd.Show();
        }
        else
        {
            MonoBehaviour.print("the ads is not loaded");
        }
    }
Exemplo n.º 16
0
 public void OnBtnViewAdClicked()
 {
     if (Tutorial.Adstart)
     {
         if (ad.IsLoaded())
         {
             ad.Show();
         }
         else
         {
             LoadAd();
         }
     }
 }
Exemplo n.º 17
0
    public void Show()
    {
        if (rewardBasedVideo.IsLoaded())
        {
            rewardBasedVideo.Show();
            Debug.Log("okey work");
        }
        else
        {
            RequestRewardBasedVideo();

            Debug.Log("not okey");
        }
    }
Exemplo n.º 18
0
 static public bool ShowAdMobRewardedVideo()
 {
     // Load the rewarded video ad with the request.
     if (rewardBasedVideo.IsLoaded())
     {
         rewardBasedVideo.Show();
         return(true);
     }
     else
     {
         RequestRewardBasedVideo();
         return(false);
     }
 }
Exemplo n.º 19
0
    //purchase buttons

    public void reward_purchase()
    {
        if (rewardBasedVideo.IsLoaded())
        {
            rewardBasedVideo.OnAdRewarded += HandleOnAdRewarded;
            rewardBasedVideo.Show();
        }
        else
        {
            this.RequestRewardBasedVideo();

            SSTools.ShowMessage("ad not loaded,try again", SSTools.Position.bottom, SSTools.Time.twoSecond);
        }
    }
 public void showVideoAd()
 {
     if (PlayerPrefs.GetInt("nads") != 1)
     {
         if (rewardedAd.IsLoaded())
         {
             rewardedAd.Show();
         }
         else
         {
             loadRewardVideo();
             Debug.Log("Rewarded Video ad not loaded");
         }
     }
 }
Exemplo n.º 21
0
 public void ShowRewardedAd(Action <bool> success)
 {
     if (rewardBasedVideo.IsLoaded())
     {
         rewardBasedVideo.Show();
         success(true);
         //RequestRewardedAd();
     }
     else
     {
         success(false);
         InitializeAdService();
         RequestRewardedAd();
     }
 }
Exemplo n.º 22
0
    public void ShowRewardVideo(GetItem _getitem)
    {
        if (rewardAdFailToLoad)
        {
            MakeNewRewardAds();
        }
        getItem = _getitem;
        Debug.Log("Show RW");
        if (rewardAds.IsLoaded())
        {
            rewardAds.Show();
        }

//		Advertisement.Show (UnityZoneID, options);
    }
Exemplo n.º 23
0
    public void ShowVideo()
    {
//#if UNITY_EDITOR
//        StartCoroutine(GameObject.FindGameObjectWithTag("GameController").GetComponent<GameManager>().giftBoxClickIEnumerator());
//#endif
        if (rewardBasedVideo.IsLoaded())
        {
            rewardBasedVideo.Show();
            VideoRequest();
        }
        else
        {
            VideoRequest();
        }
    }
Exemplo n.º 24
0
    private void Update()
    {
        if (obj.isPaused == true)
        {
            interstitial.Show();
            rewardBasedVideo.Show();

            if (interstitial.IsLoaded())
            {
                interstitial.Show();
            }


            if (rewardBasedVideo.IsLoaded())
            {
                rewardBasedVideo.Show();
            }
        }

        if (game.lifepoint == 0)
        {
            interstitial.Show();
            rewardBasedVideo.Show();

            if (interstitial.IsLoaded())
            {
                interstitial.Show();
            }


            if (rewardBasedVideo.IsLoaded())
            {
                rewardBasedVideo.Show();
            }
        }
    }
Exemplo n.º 25
0
 //показать видео
 public void ShowRewardedVedeo()
 {
     if (!UseReward)
     {
         return;
     }
     if (rewardBasedVideo.IsLoaded())
     {
         rewardBasedVideo.Show();
     }
     else
     {
         LoadReward(RewardadUnitId);
     }
 }
Exemplo n.º 26
0
    //勝ち抜きモードでのコンテニュー
    public void OnKatinukiContinue()
    {
        Sound.Instans.PlaySe(Sound.Instans.fixSound);
        katinukiContinueButton.enabled = false;
        TextMeshProUGUI k = katinukiContinueText.GetComponent <TextMeshProUGUI> ();

        DOTween.ToAlpha(() => k.color, color => k.color = color, 0.3f, 0f);
        DOVirtual.DelayedCall(1.5f, () => {
            // 動画リワード コンティニュー
            if (Advertisement.IsReady("rewardedVideo"))
            {
                var options = new ShowOptions {
                    resultCallback = (ShowResult result) => {
                        OnKatinukiReward(true);
                    }
                };

                Advertisement.Show("rewardedVideo", options);
            }
            else if (reward.IsLoaded())
            {
                reward.OnAdRewarded += (object sender, Reward e) => {
                    katinukiCtSuccess = true;
                };
                reward.OnAdClosed += (object sender, System.EventArgs e) => {
                    admobClose = true;
                    RequestReward();
                };
                reward.Show();
            }
            else
            {
                OnKatinukiReward(true);
            }
        });
    }
Exemplo n.º 27
0
    public override void Show(Action complete, Action fail)
    {
#if UNITY_EDITOR
        if (OnComplete != null)
        {
            OnComplete.Invoke();
        }
#endif

        this.OnComplete = complete;
        this.OnFail     = fail;

        if (rewardBasedVideo.IsLoaded())
        {
            rewardBasedVideo.Show();
        }
        else
        {
            if (OnFail != null)
            {
                OnFail.Invoke();
            }
        }
    }
Exemplo n.º 28
0
    public void ShowRewardBasedAd()
    {
#if UNITY_EDITOR
        Rewards[0].SetActive(true);
        StartCoroutine(RevealReward());
#endif
        if (rewardBasedVideoAd.IsLoaded())
        {
            rewardBasedVideoAd.Show();
        }
        else
        {
            Debug.Log("Ads: Error");
        }
    }
Exemplo n.º 29
0
    public void LoadAdVideo(string adUnit, GameObject adUI)
    {
        adManagerUI = adUI;
        canceled    = false;

        // Armazena o id da propaganda atual (caso seja necessário recarregar).
        currentAdUnit = adUnit;

        // Se já houver um vídeo carregador, o exibe
        if (videoAd.IsLoaded())
        {
            videoAd.Show();
            return;
        }

        // Inicia o carregamento do vídeo
        videoAd.LoadAd(new AdRequest.Builder()
                       .AddTestDevice(TEST_DEVICE_ID)
                       .Build(), adUnit);

        adManagerUI.SendMessage("OnAdVideoLoading");

        StartCoroutine("ShowAdVideoCoroutine");
    }
Exemplo n.º 30
0
 public void showAdd(RewardBasedVideoAd rewardBasedVideo)
 {
     if (rewardBasedVideo.IsLoaded())
     {
         //Subscribe to Ad event
         rewardBasedVideo.OnAdRewarded += HandleRewardBasedVideoRewarded;
         rewardBasedVideo.Show();
     }
     else
     {
         if (interstitial.IsLoaded())
         {
             interstitial.Show();
         }
     }
 }