コード例 #1
0
    protected void OnClickTips(Button obj)
    {
//#if UNITY_EDITOR
//        OnTipsWatchRewardAdSuccessed();
//        return;
//#endif
        if (playerData.leftNumTips > 0)
        {
            --playerData.leftNumTips;
            txtLeftTips.text = playerData.leftNumTips.ToString();
            OnTipsWatchRewardAdSuccessed();
        }

        return;

        if (AdmobManager.GetInstance().isLoaded)
        {
            requestADButUnload = false;
            AdmobManager.GetInstance().UserChoseToWatchAd(OnTipsWatchRewardAdSuccessed);
        }
        else
        {
            requestADButUnload = true;
            PageMgr.ShowPage <UIWaitAd>(5000);
        }
    }
コード例 #2
0
 void OnRewardADLoadSuccess(Message msg)
 {
     PageMgr.ClosePage <UIWaitAd>();
     if (requestADButUnload)
     {
         requestADButUnload = false;
         AdmobManager.GetInstance().UserChoseToWatchAd(OnTipsWatchRewardAdSuccessed);
     }
 }
コード例 #3
0
 void ShowAD()
 {
     if (AdmobManager.GetInstance().isLoaded)
     {
         requestADButUnload = false;
         AdmobManager.GetInstance().UserChoseToWatchAd(Next);
     }
     else
     {
         requestADButUnload = true;
         PageMgr.ShowPage <UIWaitAd>(5000);
     }
 }
コード例 #4
0
 protected void OnClickedAD(Button obj)
 {
     if (AdmobManager.GetInstance().isLoaded)
     {
         requestADButUnload = false;
         AdmobManager.GetInstance().UserChoseToWatchAd(OnTipsWatchRewardAdSuccessed);
     }
     else
     {
         requestADButUnload = true;
         PageMgr.ShowPage <UIWaitAd>(5000);
     }
 }
コード例 #5
0
 private void OnClickBtnADTest(string str)
 {
     if (AdmobManager.GetInstance().isLoaded)
     {
         requestADButUnload = false;
         AdmobManager.GetInstance().UserChoseToWatchAd(OnWatchRewardAdSuccessed_Test);
     }
     else
     {
         requestADButUnload = true;
         PageMgr.ShowPage <UIWaitAd>(5000);
     }
 }