public override void Tick(int deltaTimeMS) { if (!isSendFinished) { return; } if (isClosed) { return; } waitCD.Tick(deltaTimeMS); if (waitCD.IsRunning() && waitCD.IsFinish()) { isClosed = true; PageMgr.ClosePage("UILoading"); //this.fsmCtr.Stop(); PageMgr.ShowPage <UIMainPage>(); //var playerData = GlobalDataManager.GetInstance().playerData; ////存储当前场景ID //playerData.playerZoo.currSceneID = (fsmCtr as FSMGameLoad).sceneID; } }
public override void Active() { base.Active(); IninCompentData(); //设置新手阶段 的按钮置灰 //UIPage.SwitchButtonUnClickable(returnButton,! playerData.playerLittleGame.isFirst); PageMgr.ClosePage <UIGameVictoryPage>(); //if (playerData.playerLittleGame.isFirst) //{ // OnGuideCrossRoad(); //} //else { tipsHand.gameObject.SetActive(false); } float p = UnityEngine.Random.Range(0f, 1f); isShowAD = false; next_text.text = next_text.text.Replace("AD ", ""); if (p >= 0.5f) { isShowAD = true; next_text.text = "AD " + next_text.text; } }
protected void OnClickedNextLevel(string objName) { PageMgr.ClosePage(this); var level = PageMgr.GetPage <UILevel2>(); level.GenLevel(true); }
void OnRewardADLoadSuccess(Message msg) { PageMgr.ClosePage <UIWaitAd>(); if (requestADButUnload) { requestADButUnload = false; AdmobManager.GetInstance().UserChoseToWatchAd(OnTipsWatchRewardAdSuccessed); } }
void OnRewardADLoadFail(Message msg) { PageMgr.ClosePage <UIWaitAd>(); if (requestADButUnload) { requestADButUnload = false; PromptText.CreatePromptText(false, "Load AD Fail"); } }
private void OnCloseButtonClick(string str) { float timeCount = 0.1f; DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate { PageMgr.ClosePage(this); })); }
/// <summary> /// 关闭UI /// </summary> /// <param name="obj"></param> private void OnClickCloseButton(string obj) { float timeCount = 0.1f; DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate { PageMgr.ClosePage <UITestToolWindowPage>(); })); //Hide(); }
void Next() { PageMgr.ClosePage <UIGameVictoryPage>(); PageMgr.ClosePage <UIGameFailPage>(); int stageID = CrossRoadModelManager.GetInstance().stageID; CrossRoadStageManager.GetInstance().UnLoad(); CrossRoadGame.CrossRoadStageManager.GetInstance().Load(stageID); }
protected void SetAndroidQuit() { #if UNITY_EDITOR if (Input.GetKeyDown(KeyCode.Escape)) #else if (Application.platform == RuntimePlatform.Android && Input.GetKeyDown(KeyCode.Escape)) #endif { PageMgr.ClosePage(this); } }
void Next() { PageMgr.ClosePage <UIGameVictoryPage>(); PageMgr.ClosePage <UIGameFailPage>(); SendCrossRoadAward(); CrossRoadStageManager.GetInstance().UnLoad(); CrossRoadGame.CrossRoadStageManager.GetInstance().Load(playerData.playerLittleGame.stageID + 1); returnButton.enabled = false; receiveButton.enabled = false; }
private void OnEnterSceneButtonClick(string str) { ScenePlayerDataMSS.SceneStateMSS sceneState = mapModel.GetSceneState(selectedPieceId); bool unlocked = sceneState != null ? sceneState.unlocked > 0 : false; if (unlocked && mapModel.currSceneId != selectedPieceId) { enterSceneButton.gameObject.SetActive(false); PageMgr.ClosePage(this); ZooGameLoader.GetInstance().ChangeScene(selectedPieceId); } }
private void CloseAllPage() { var allPages = PageMgr.allPages; foreach (var item in allPages) { if (item.Value.name != "UIMainPage") { PageMgr.ClosePage(item.Value); } } }
private void OnConfirmButtonClick(string str) { mapModel.BrowseScene(int.Parse(m_data.ToString())); var mapPage = PageMgr.GetPage <UIMapPage>(); mapPage.UpdatePieceStatesDisplay(); var mainPage = PageMgr.GetPage <UIMainPage>(); if (mainPage != null) { mainPage.UpdateDisplayForSceneStates(); } PageMgr.ClosePage(this); }
/// <summary> /// 关闭页面 /// </summary> /// <param name="obj"></param> private void OnClickCloseButton(string obj) { float timeCount = 0.1f; DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate { PageMgr.ClosePage <UINewCurrencyAdvertPage>(); })); MessageString.Send((int)GameMessageDefine.UIMessage_ActiveButShowPart, "UIMainPage"); if (adTagFM == AdTagFM.Add_Offline_Advert) { ActualEarnings(offlineRewardCoin); HideUICallBack(); } }
/// <summary> /// 活跃 /// </summary> public override void Active() { base.Active(); //取消其他的UI var allPage = PageMgr.allPages; foreach (var item in allPage) { if (item.Value.name != this.name && item.Value.name != "UIMainPage") { PageMgr.ClosePage(item.Value); } } MessageString.Send((int)GameMessageDefine.UIMessage_ActiveButHidePart, "UIMainPage"); numberVisitor = PlayerDataModule.SteameVisitorNameber(); adTagFM = InitCompentToAdTagFM(); }
public override void Active() { base.Active(); MessageManager.GetInstance().Regist((int)GameMessageDefine.CrossRoadCameraStopMove, this.OnGetCrossRoadCameraStopMove); MessageManager.GetInstance().Regist((int)GameMessageDefine.CrossRoadAnimalTeamArrived, this.OnGetCrossRoadAnimalTeamArrived); uIBackgroundImage.gameObject.SetActive(true); reviveButton.gameObject.SetActive(true); IninCompentData(); if (!playerData.playerLittleGame.isFirst) { OnGuideCrossRoad(); } tipsGroup.gameObject.SetActive(true); PageMgr.ClosePage <UIGameVictoryPage>(); PageMgr.ClosePage <UIGameFailPage>(); }
public void SetClosePage(UIPage closeIPage) { if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide != true) { float timeCount = 0.1f; DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate { PageMgr.ClosePage(closeIPage.name); MessageString.Send((int)GameMessageDefine.UIMessage_ActiveButShowPart, "UIMainPage"); })); iPage = null; } else { return; } }
private void CloseOthersPageAndTaskPanel() { foreach (var page in PageMgr.allPages.Values) { if (page is UIMainPage) { continue; } PageMgr.ClosePage(page); } UIMainPage mainPage = PageMgr.GetPage <UIMainPage>(); if (mainPage != null) { mainPage.CloseGuideTaskPanel(); } }
public static void CloseAllPage(bool isAll, string exceptPage) { var allPages = PageMgr.allPages; foreach (var item in allPages) { if (!isAll) { if (item.Value.name != exceptPage) { PageMgr.ClosePage(item.Value); } } else { PageMgr.ClosePage(item.Value); } } }
/// <summary> /// 离线金币计算 /// 计算所第一个场景的离线收益 /// </summary> /// <returns></returns> protected void CalcOfflineRewardCoinMMSC() { //离线时间 long offlineSeconds = (long)GlobalDataManager.GetInstance().offlineSeconds; if (offlineSeconds <= 0) { PageMgr.ClosePage(this); } //离线时间不能超出最大值 if (offlineSeconds >= Config.globalConfig.getInstace().WaitingADTimeMax) { offlineSeconds = Config.globalConfig.getInstace().WaitingADTimeMax; } var perMinCoin = PlayerDataModule.CurrScenePerMinCoin(true); offlineRewardCoin = offlineSeconds * perMinCoin / 60; }
public void Init(int sceneID = -1) { if (sceneID == -1) { sceneID = GlobalDataManager.GetInstance().playerData.playerZoo.currSceneID; } PageMgr.ClosePage <UIParkPage>(); PageMgr.ClosePage <UIEntryPage>(); PageMgr.ClosePage <UIZooPage>(); SetPackingToClickCallbacks(sceneID); SetTicketToClickCallbacks(sceneID); //对clickCallbacks字典进行数据填充 //clickCallbacks.Clear(); //获取数据 var littleZooModuleDatas = GlobalDataManager.GetInstance().playerData.playerZoo.littleZooModuleDatasMSS; for (int i = 0; i < littleZooModuleDatas.Count; i++) { if (littleZooModuleDatas[i].sceneID == sceneID) { if (!clickCallbacks.ContainsKey(littleZooModuleDatas[i].littleZooID.ToString())) { GlobalDataManager.GetInstance().playerData.GetLittleZooIDIndexOfDataIdx(littleZooModuleDatas[i].littleZooID); //LogWarp.LogError("不包含此 " + littleZooModuleDatas[i].littleZooID + " 等级=" + GlobalDataManager.GetInstance().playerData.GetLittleZooIDIndexOfDataIdx(littleZooModuleDatas[i].littleZooID)); int level = littleZooModuleDatas[i].littleZooTicketsLevel; clickCallbacks.Add(littleZooModuleDatas[i].littleZooID.ToString(), OnClickZoo); if (level < 1) { break; } } } } }
//private void GameLoadSceneFristCallBack() //{ // float value = 1 / 6f; // SliderValueLoading(value); //} //private void GameLoadSceneLastCallBack() //{ // PageMgr.ShowPage<UIMainPage>(); // if (LoadingMgr.Inst.debugCamera) // { // PageMgr.ShowPage<UIEditor>(); // } // SliderValueLoading(1); // PageMgr.ClosePage(this); //} //private void PerSceneLoadCallBack(float val) //{ // SliderValueLoading(val / 6); //} private void EditorLoadSceneCallBack() { PageMgr.ClosePage(this); }
void WhenLoadFinish() { (this.fsmCtr as FSMCrossRoadGame).SetLoadingPageSlider(); PageMgr.ClosePage((this.fsmCtr as FSMCrossRoadGame).loadingPageName); MessageManager.GetInstance().Send((int)GameMessageDefine.LoadCrossRoadLevelFinished); }
private void OnClickClose(string path) { PageMgr.ClosePage(this); }
private IEnumerator PlayCompleteEffect() { yield return(new WaitForSeconds(0.54f)); PageMgr.ClosePage <UIMoneyEffect>(); }