Ejemplo n.º 1
0
 public override void OnResetGame()
 {
     if (AdMgr.IsAdmobInterstitialReady())
     {
         AdMgr.ShowAdmobInterstitial();
     }
 }
Ejemplo n.º 2
0
    public void UnlockAdPuzzle()
    {
        //TODO:接入广告界面
        AdMgr.GetInstance().showRewardVideo(() =>
        {
            Debug.Log("play ad succ");
            //隐藏广告按钮
            if (puzzleBarForFreeLayoutTrans.childCount > 0)
            {
                puzzleBarForFreeLayoutTrans.GetChild(0).gameObject.SetActive(false);
            }

            //将拼图lockstate设置为false
            if (adPuzzleNum == 1)
            {
                Transform adPuzzleTrans     = this.transform.GetChild(this.transform.childCount - 1);
                PuzzleItemUI adPuzzleUI     = adPuzzleTrans.GetComponent <PuzzleItemUI>();
                PuzzleItemData adPuzzleData = adPuzzleUI.puzzleItemData;
                adPuzzleData.Plockstate     = false;
            }

            //将useflag设为true
            //adPuzzleUseFlag = true;//没有用于实际判断,暂时注释
        },
                                            () =>
        {
            Debug.Log("play ad fail");
        },
                                            () =>
        {
            Debug.Log("close ad");
        });
    }
Ejemplo n.º 3
0
 public override void OnGameAnimDone()
 {
     if (AdMgr.IsAdmobInterstitialReady())
     {
         AdMgr.ShowAdmobInterstitial();
         isShowed = true;
     }
 }
Ejemplo n.º 4
0
 void Ready_Enter()
 {
     AdMgr.PreloadAdmobInterstitial();
     _uiMgr.OnReady();
     _uiMgr.SetStateText("Get Ready!");
     _initCellNum = 10;
     Reset();
     _uiMgr.UpdateUI();
     // _fsm.ChangeState(PlayState.Playing);
 }
Ejemplo n.º 5
0
 public override void OnResetGame()
 {
     if (AdMgr.IsAdmobInterstitialReady())
     {
         if (!isShowed)
         {
             AdMgr.ShowAdmobInterstitial();
         }
         else
         {
             isShowed = false;
         }
     }
 }
Ejemplo n.º 6
0
    public void Init()
    {
        InitGrid();
        //Physics.gravity = new Vector3(0, -30.0F, 0);
        _uiMgr      = FindObjectOfType <UIMgr>();
        _settingMgr = SettingMgr.Instance;
        _settingMgr.LoadFile();
        _uiMgr.UpdateUI();

        _fsm = StateMachine <PlayState> .Initialize(this, PlayState.Ready);

        _indicator = GetComponentInChildren <Indicator>();
        _indicator.gameObject.SetActive(false);

        AdMgr.RegisterAllAd();
        AdMgr.ShowAdmobBanner();
    }
Ejemplo n.º 7
0
    private void OnPayRemoveAD(JsonData data)
    {
        int retcode = (int)data["Ret"];

        if (retcode == 1)
        {
#if UNITY_EDITOR
            //UIMgr.GetInstance().ShowSimpleTips("购买去广告服务成功");
#endif
            XPlayerPrefs.SetInt(AdMgr.Pay2RemoveAD_Tag, 1);
        }
        else
        {
            XPlayerPrefs.SetInt(AdMgr.Pay2RemoveAD_Tag, 0);
        }
        AdMgr.GetInstance().isPaying = false;
    }
Ejemplo n.º 8
0
    public void CheckChallenge()
    {
#if UNITY_IOS && !UNITY_EDITOR
        if (m_selectedDateTime != DateTime.Today && !m_selectedDayObject.GetComponent <DayTest>().isChallenged)
        {
            //未挑战通过的关卡,播放广告
            AdMgr.GetInstance().showRewardVideo(() =>
            {
                StartChallenge();
            }, null, null);
        }
        else
        {
            StartChallenge();
        }
#elif UNITY_EDITOR
        Debug.Log("播放广告");
        StartChallenge();
#endif
    }
Ejemplo n.º 9
0
 public void ShowAD()
 {
     AdMgr.GetInstance().Pay4RemoveAD();
 }
Ejemplo n.º 10
0
 public virtual void OnDealAnimDone()
 {
     AdMgr.PreloadAdmobInterstitial();
 }
Ejemplo n.º 11
0
 public void ShowAD()
 {
     AdMgr.GetInstance().InterstitialTrigger();
 }
Ejemplo n.º 12
0
 public void OnReplay()
 {
     AdMgr.ShowAdmobInterstitial();
     LevelMgr.Current.ToReady();
 }
Ejemplo n.º 13
0
 public override void OnDealAnimDone()
 {
     AdMgr.PreloadAdmobInterstitial();
 }