/// <summary> /// CD 结束 发送消息 /// </summary> protected void WhenCDFinished() { var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; var msg = EntryGateCheckInCDFinshedApply.Send(entity.entityID, entity.zooEntryID); isSendCDFinshed = true; if (GlobalData.GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true) { UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>(); if (uIGuidePage == null) { string e = string.Format("新手引导界面 PageMgr.allPages里 UIGuidePage 为空"); throw new System.Exception(e); } if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_15) { PageMgr.ShowPage <UIGuidePage>(); //开启新手引导UI } else if (uIGuidePage.newBieGuild_step < NewBieGuild.Step_15) { uIGuidePage.TAEvent_finish(); uIGuidePage.newBieGuild_step = NewBieGuild.Step_15; uIGuidePage.TAEvent_start(); //本阶段显示文本 uIGuidePage.TAEvent_process(); uIGuidePage.OnClickDialogBoxButton(); } } DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} WhenCDFinished send {1}", entity.entityID, msg); }
private void DetectButtonClick() { if (IsPointerOverUI()) { return; } if (Input.GetMouseButtonDown(0)) { Ray ray = sceneCamera.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit, 1000f)) { if (hit.transform == balloonTrans) { miscModel.freeItemAdState = FreeItemAdState.ViewOpened; detectBalloonClick = false; //PageMgr.ShowPage<UIAdvertTouristPage>("FreeItemButton"); PageMgr.ShowPage <UINewCurrencyAdvertPage>(AdTagFM.Add_Viptiming_Advert); PageMgr.GetPage <UINewCurrencyAdvertPage>().onClose.AddListener(OnAdvertTouristPageClose); } } } }
public override void Enter(int preStateName) { base.Enter(preStateName); var follow = (this.fsmCtr as FSMFollowPathSuperMarketSimply).owner; var entity = follow.ownerEntity as EntityGroundParkingCar; entity.anim.Stop(); //LogWarp.LogErrorFormat("{0} car StateFollowPathSuperMarketSimply_StayParking {1}, {2}", entity.entityID, // entity.groundParkingGroupID, entity.groundParkingIdx); MessageGroundParkingSpace.Send((int)GameMessageDefine.ParkingCarInGroundParking, entity.groundParkingGroupID, entity.groundParkingIdx); SpawnVisitorFromGroundParking.Send(VisitorStage.GotoParking, EntityFuncType.Visitor_From_GroundParking, entity.groundParkingGroupID, entity.groundParkingIdx); /* 新手引导阶段 进行步骤4 添加跟随对象 */ if (GlobalData.GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true) { UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>(); if (uIGuidePage == null) { string e = string.Format("新手引导界面 PageMgr.allPages里 UIGuidePage 为空"); throw new System.Exception(e); } if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_3) { PageMgr.ShowPage <UIGuidePage>(); //开启新手引导UI uIGuidePage.entity = entity; } } }
public void OnClickEntry() { if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true) { UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>(); if (uIGuidePage == null) { string e = string.Format("新手引导界面 PageMgr.allPages里 UIGuidePage 为空"); throw new System.Exception(e); } if (uIGuidePage.newBieGuild_step != NewBieGuild.Step_12) { return; } else { //取消场景特效 进入场景点击事件 uIGuidePage.DestroyEffectChild(); uIGuidePage.TAEvent_finish(); uIGuidePage.TAEvent_start((int)uIGuidePage.newBieGuild_step + 1); uIGuidePage.TAEvent_process((int)uIGuidePage.newBieGuild_step + 1); uIGuidePage.SetCameraOnClickScene(sceneUIButtonPos); } } PageMgr.ShowPage <UIEntryPage>(); //摆渡车UI交互 iPage = new UIEntryPage(); SetMainPageHidePart(gameObject); }
public void OnClickZoo() { //判断当前动物栏的等级是否不为0 为0开启新的动物栏 int litteZooLevel = GlobalDataManager.GetInstance().playerData.GetLittleZooModuleData(int.Parse(nameID)).littleZooTicketsLevel; if (litteZooLevel > 0) { if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true) { UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>(); if (uIGuidePage == null) { string e = string.Format("新手引导界面 PageMgr.allPages里 UIGuidePage 为空"); throw new System.Exception(e); } //LogWarp.LogErrorFormat("测试: 新手引导步骤 动物栏点击 {0} ", uIGuidePage.procedure); if (uIGuidePage.newBieGuild_step != NewBieGuild.Step_20) { return; } else { //取消场景特效 进入场景点击事件 uIGuidePage.DestroyEffectChild(); uIGuidePage.TAEvent_finish(); uIGuidePage.TAEvent_start((int)uIGuidePage.newBieGuild_step + 1); uIGuidePage.TAEvent_process((int)uIGuidePage.newBieGuild_step + 1); uIGuidePage.SetCameraOnClickScene(sceneUIButtonPos); //uIGuidePage.TAEvent_finish(1); //uIGuidePage.TAEvent_start(2); } } //LogWarp.LogErrorFormat("ssssssssssssssss {0}", nameID); //显示UI PageMgr.ShowPage <UIZooPage>(nameID); //动物栏UI交互 iPage = new UIZooPage(); UITestToolWindowPage uITestToolWindowPage = PageMgr.GetPage <UITestToolWindowPage>(); if (uITestToolWindowPage != null) { uITestToolWindowPage.littleZooID = int.Parse(nameID); } SetMainPageHidePart(gameObject); } else { int idx = Config.buildupConfig.getInstace().getCell(nameID).affirmopen; if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true) { return; } if (idx == 0) { PromptText.CreatePromptText("Ui_Text_122"); return; } PageMgr.ShowPage <UIBuildOpenPage>(nameID); //开启新的动物园交互 iPage = new UIBuildOpenPage(); SetMainPageHidePart(gameObject); } }
protected void btn_Live_SetHomePage_Click(object sender, EventArgs e) { if (!DataEval.IsEmptyQuery(_pageindexid)) { PageMgr myPageMgr = new PageMgr(); PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid); if (myPageIndex.Page_CategoryID == "2") { Tools.AlertMessage.Show_Alert(this.Page, "<h4>Inactive page can not be set as homepage.", "Action failed!"); return; } Phrases.PhraseMgr myPhraseMgr = new Phrases.PhraseMgr(); e2Data[] UpdateData = { new e2Data("VarName", "NexusCore_HomepageID"), new e2Data("PhraseValue", _pageindexid) }; myPhraseMgr.Edit_Phrase(UpdateData); OnClick(sender, e); } }
/// <summary> /// 是否是新手引导需要的转圈 /// </summary> /// <param name="goLittleZoo"></param> /// <param name="littleZooID"></param> private static void IsGuidOpenUIBuildShowPage(GameObject goLittleZoo, int littleZooID) { if (!GlobalDataManager.GetInstance().playerData.playerZoo.isGuide) { return; } GlobalDataManager.GetInstance().playerData.playerZoo.BuildShowTransform = goLittleZoo.transform; float timeCount = 0.1f; DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate { PageMgr.ShowPage <UIBuildShowPage>(littleZooID); //旋转视角UI })); System.Action action = null; action?.Invoke(); var anim = goLittleZoo.GetComponentInChildren <Animation>(); if (anim != null) { SimpleAnimation buildingClickSa = new SimpleAnimation(); buildingClickSa.Init(anim); buildingClickSa.Play(Config.globalConfig.getInstace().BuildClickAnim); } }
public void Control_FillData() { #region Set Default Setting tbx_ScriptURL.Text = ""; tbx_UpdateScriptURL.Text = ""; Panel_Update_Script.Visible = false; tbx_CSSURL.Text = ""; tbx_UpdateCSSURL.Text = ""; Panel_Update_CSS.Visible = false; #endregion // Script PageMgr myPageMgr = new PageMgr(); GridView_GlobalScripts.DataSource = myPageMgr.Get_Page_MetaTags("-1", Meta_Type.JavaScript); GridView_GlobalScripts.DataBind(); GridView_Scripts.DataSource = myPageMgr.Get_Page_MetaTags(_pageindexid, Meta_Type.JavaScript); GridView_Scripts.DataBind(); // CSS GridView_GlobalCSS.DataSource = myPageMgr.Get_Page_MetaTags("-1", Meta_Type.StyleSheet); GridView_GlobalCSS.DataBind(); GridView_CSS.DataSource = myPageMgr.Get_Page_MetaTags(_pageindexid, Meta_Type.StyleSheet); GridView_CSS.DataBind(); }
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 btn_Normal_Delete_Click(object sender, EventArgs e) { if (!DataEval.IsEmptyQuery(_pageindexid)) { PageMgr myPageMgr = new PageMgr(); Page_PropertyMgr myPage_PropertyMgr = new Page_PropertyMgr(); PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid); switch (myPageIndex.Page_Type) { case Page_Type.Normal_Page: myPageMgr.Delete_PageIndex(_pageindexid); break; case Page_Type.Category: myPageMgr.Delete_PageIndex(_pageindexid); break; case Page_Type.Internal_Page_Pointer: myPage_PropertyMgr.Remove_Page_IntLink(_pageindexid); myPageMgr.Remove_PageIndex(_pageindexid); break; case Page_Type.External_Link: myPage_PropertyMgr.Remove_Page_ExtLink(_pageindexid); myPageMgr.Remove_PageIndex(_pageindexid); break; } OnDeletePageClick(sender, e); } }
/// <summary> /// 争对新手引导阶段做些操作 /// </summary> private void DelayedOperationNewbieGuideStage() { //根据新手引导阶段的步骤显示对应的特效和隐藏对应的按钮点击事件 UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>(); if (uIGuidePage == null) { string e = string.Format("新手引导界面 PageMgr.allPages里 UIGuidePage 为空"); throw new System.Exception(e); } if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_20) { //停车场停车位按钮处显示小手点击动画 effectNode = tickets_Button.transform.Find("effectNode"); Transform trans = null; trans = ResourceManager.GetInstance().LoadGameObject(Config.globalConfig.getInstace().GuideUiClickEffect).transform; trans.SetParent(effectNode, true); trans.localScale = UnityEngine.Vector3.one; trans.position = effectNode.position; trans.localPosition = new UnityEngine.Vector3( trans.localPosition.x, trans.localPosition.y + 4, trans.localPosition.z); } }
private void Control_Init() { PageMgr myPageMgr = new PageMgr(); ListView_PageVersion.DataSource = myPageMgr.Get_Pages(_pageindexid); ListView_PageVersion.DataBind(); }
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); } }
protected void SetAndroidQuit() { #if UNITY_EDITOR if (Input.GetKeyDown(KeyCode.Escape)) #else if (Application.platform == RuntimePlatform.Android && Input.GetKeyDown(KeyCode.Escape)) #endif { if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide) { return; } var activePages = PageMgr.GetActivePages(); if (activePages.Count == 1 && activePages[0].name == "UIMainPage") { //只有主界面存在,并且点了返回键 PageMgr.ShowPage <UIQuitGamePage>(); return; } foreach (var item in PageMgr.allPages) { if (item.Key != "UIMainPage") { item.Value.Hide(); } } } }
private void Load_Category(string PageIndexID) { PageMgr myPageMgr = new PageMgr(); PageIndex myChild_PageIndex = myPageMgr.Get_Child_PageIndex(PageIndexID, null); Response.Redirect(Nexus.Core.Tools.URLParse.Update_Arg(Request.Url.ToString(), "PageIndexID", myChild_PageIndex.PageIndexID)); }
private void Page_Controls() { // Check Homepage PageMgr myPageMgr = new PageMgr(); if (DataEval.IsEmptyQuery(_pageindexid) || !myPageMgr.Chk_PageIndexID(_pageindexid) || !Convert.ToBoolean(Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_HomeSwitch"))) { Response.Write("<table width=100% height=100%><tr><th>" + "<h1><strong>Thank you for visiting our web site.</strong></h1><p>Please return soon for updates.</p>" + "</th></tr></table>"); return; } // Load MasterPage Control bool isEditMode; if (Session["isEditMode"] != null) { isEditMode = Convert.ToBoolean(Session["isEditMode"]); } else { isEditMode = false; } Nexus.Core.Templates.MasterPageMgr myMasterPageMgr = new Nexus.Core.Templates.MasterPageMgr(); myMasterPageMgr.Load_MasterPageControls_WebView(this.Page, myPage_Loading_Info, isEditMode); // Load Page Control myPageMgr.Load_PageControls_WebView(this.Page, myPage_Loading_Info, isEditMode); }
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; } }
protected void OnClickedNextLevel(string objName) { PageMgr.ClosePage(this); var level = PageMgr.GetPage <UILevel2>(); level.GenLevel(true); }
/// <summary> /// 给按钮添加点击事件 /// </summary> /// <param name="path">按钮路径</param> /// <param name="onClick">按钮点击事件</param> /// <returns></returns> protected Button RegistBtnAndClick(string path, Action <string> onClick, bool isScaleAnim = true) { Button btn = null; if (this.transform != null) { var go = this.transform.Find(path); if (go == null) { Debugger.LogWarning(path); return(btn); } btn = go.GetComponent <Button>(); if (btn == null) { return(btn); } btn.onClick.AddListener(delegate { onClick(go.name); if (isScaleAnim) { BtnScaleAnim(btn.gameObject, 1.1f, 0.95f); } PageMgr.PlayButtonSound(); }); } return(btn); }
public void OnLogCallback(string condition, string stackTrace, LogType type) { //注意!!!!禁止在这里添加任何代码!!! if (!isShowException) { return; } if (type == LogType.Exception) { string uiException = condition + "\n\n"; uiException += stackTrace; PageMgr.ShowPage <UIShowException>(uiException); #if UNITY_EDITOR //UnityEditor.EditorApplication.isPlaying = false; UnityEditor.EditorApplication.isPaused = true; string strTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); Debug.LogErrorFormat("{0} 游戏异常中断", strTime); #else if (isExceptionQuit) { Application.Quit(); } #endif } }
IEnumerator AsyncShow(Action callback) { //1:Instance UI //FIX:support this is manager multi gameObject,instance by your self. if (this.gameObject == null && string.IsNullOrEmpty(uiPath) == false) { GameObject go = null; bool _loading = true; PageMgr.delegateAsyncLoadUI(uiPath, (o) => { go = o != null ? GameObject.Instantiate(o) as GameObject : null; AnchorUIGameObject(go); Awake(go); isAsyncUI = true; _loading = false; //:animation active. Active(); //:refresh ui component. Refresh(); //:popup this node to top if need back. PageMgr.PopNode(this); if (callback != null) { callback(); } }); float _t0 = Time.realtimeSinceStartup; while (_loading) { if (Time.realtimeSinceStartup - _t0 >= 10.0f) { Debugger.LogError("[UI] WTF async load your ui prefab timeout!"); yield break; } yield return(null); } } else { //:animation active. Active(); //:refresh ui component. Refresh(); //:popup this node to top if need back. PageMgr.PopNode(this); if (callback != null) { callback(); } } }
public override void Enter(int preStateName) { base.Enter(preStateName); //ResourceManager.GetInstance().LoadSceneAsync("Stage", LoadSceneFinished, null); //PageMgr.ShowPage<UIStage>(); PageMgr.ShowPage <UILevel2>(); }
/// <summary> /// 小游戏失败 /// </summary> /// <param name="obj"></param> private void OnGetCrossRoadGameFailure(Message obj) { gameModules.Stop(); //弹出UI 失败 LogWarp.LogError("游戏失败"); PageMgr.ShowPage <UIGameFailPage>(); }
private IEnumerator FinishMoneyEffect() { yield return(new WaitForSeconds(0.1f)); UIMainPage uIMainPage = PageMgr.GetPage <UIMainPage>(); uIMainPage.OnMoneyEffect();//飘钱特效 }
/// <summary> /// 收到设置售票口的门票等级升级的消息 /// </summary> /// <param name="msg"></param> protected void OnSetEntryGateLevelOfPlayerData(Message msg) { var _msg = msg as SetDetailValueOfPlayerData; int entryTicketsLevel = GlobalDataManager.GetInstance().playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel; if ((entryTicketsLevel + _msg.detailVal) > ticketCell.lvmax) { return; } // 涉及金币减扣 BigInteger bigDelta = EntryGateModule.GetUpGradeConsumption(entryTicketsLevel, _msg.detailVal); //bool retCode = VaryDataCoin(bigDelta); //if (!retCode) //{ // //string e = string.Format("售票口门票升级扣钱失败"); // //throw new System.Exception(e); // return; //} //BroadcastValueOfPlayerData.Send((int)GameMessageDefine.BroadcastCoinOfPlayerData, // 0, 0, BigInteger.Parse(GlobalDataManager.GetInstance().playerData.playerZoo.coin), bigDelta); if (!playerData.playerZoo.playerCoin.WarpAddCoin(playerData, -bigDelta)) { return; } this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel += _msg.detailVal; BroadcastValueOfPlayerData.Send((int)GameMessageDefine.BroadcastEntryGateLevelOfPlayerData, this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel, _msg.deltaVal, 0, 0); BuildingLevelup.Send((int)BuildingTypeFM.EntryGate, -1, (int)EntryGateProperty.TicketPrice, this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel); //收集星星: var sortEntryGateIDs = GlobalDataManager.GetInstance().logicTableEntryGate.GetSortGateIDs(currSceneID); var lvshage = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]).lvshage; int idx = FindLevelRangIndex01(lvshage, this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel); int stageLevel = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]).lvshage[idx]; if (this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel == stageLevel) { int awardType = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]).lvrewardtype[idx]; int awardID = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]).lvreward[idx]; var cell = Config.itemConfig.getInstace().getCell(awardID); if (awardType == 1) { //发放奖励道具 MessageInt.Send((int)GameMessageDefine.GetItem, awardID); if (cell.itemtype == 2) { PageMgr.GetPage <UIMainPage>().OnMoneyEffect(); } //LogWarp.LogErrorFormat("售票口 当前等级为{0},可以发放奖励道具{1}", stageLevel, awardID); } //发放星星 MessageInt.Send((int)GameMessageDefine.GetItem, 4); //LogWarp.LogErrorFormat("售票口 当前等级为{0},可以发放星星", stageLevel); } }
/// <summary> /// 图鉴入口 /// </summary> /// <param name="obj"></param> private void OnClickCollectButton(string obj) { float timeCount = 0.1f; DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate { PageMgr.ShowPage <UIAnimalAtlasPage>(); //图鉴入口 })); }
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> /// 动物培养开启功能 /// </summary> /// <param name="obj"></param> private void OnClickAdsButton_StrengthenButton(string obj) { float timeCount = 0.1f; DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate { PageMgr.ShowPage <UIAnimalTipsPage>(); })); }