public override void OnResetGame() { if (AdMgr.IsAdmobInterstitialReady()) { AdMgr.ShowAdmobInterstitial(); } }
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"); }); }
public override void OnGameAnimDone() { if (AdMgr.IsAdmobInterstitialReady()) { AdMgr.ShowAdmobInterstitial(); isShowed = true; } }
void Ready_Enter() { AdMgr.PreloadAdmobInterstitial(); _uiMgr.OnReady(); _uiMgr.SetStateText("Get Ready!"); _initCellNum = 10; Reset(); _uiMgr.UpdateUI(); // _fsm.ChangeState(PlayState.Playing); }
public override void OnResetGame() { if (AdMgr.IsAdmobInterstitialReady()) { if (!isShowed) { AdMgr.ShowAdmobInterstitial(); } else { isShowed = false; } } }
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(); }
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; }
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 }
public void ShowAD() { AdMgr.GetInstance().Pay4RemoveAD(); }
public virtual void OnDealAnimDone() { AdMgr.PreloadAdmobInterstitial(); }
public void ShowAD() { AdMgr.GetInstance().InterstitialTrigger(); }
public void OnReplay() { AdMgr.ShowAdmobInterstitial(); LevelMgr.Current.ToReady(); }
public override void OnDealAnimDone() { AdMgr.PreloadAdmobInterstitial(); }