/// <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); }
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); } }
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 override void Enter(int preStateName) { base.Enter(preStateName); var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorStayVisitSeat.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName); isToVisitorStateChoseLittleZoo = false; isToStateVisitorLeaveNonLittleZoo = false; shouldImmediateFinishVisitCD = false; effID = Const.Invalid_Int; effGo = null; isRevCDVal = false; if (visitCD != null) { visitCD.Stop(); } // LogWarp.LogFormat("-->Visitor enter tour state: littleZooId ={0}visitorId ={1}", entity.stayBuildingID, entity.entityID); // 观光游客面朝动物栏中心 entity.LookAt(LittleZooPosManager.GetInstance().GetPos(entity.stayBuildingID)); MessageManager.GetInstance().Regist((int)GameMessageDefine.LittleZooDataReply, OnLittleZooDataReply); MessageManager.GetInstance().Regist((int)GameMessageDefine.VisitorVisitCDFinshedReply, OnVisitorVisitCDFinshedReply); MessageManager.GetInstance().Regist((int)GameMessageDefine.ImmediateFinishVisitCD, OnImmediateFinishVisitCD); //模型到达动物栏等待位 调用新手引导的内容 显示步骤16 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.LogError("测试: uIGuidePage.procedure= " + uIGuidePage.procedure); if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_16) { uIGuidePage.TAEvent_finish(); uIGuidePage.newBieGuild_step = NewBieGuild.Step_17; uIGuidePage.TAEvent_start(); //本阶段显示文本 uIGuidePage.TAEvent_process(); uIGuidePage.OnClickDialogBoxButton(); } else if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_17) { PageMgr.ShowPage <UIGuidePage>(); //开启新手引导UI } } //进入这个状态开始计算游览cd LittleZooData.Send(entity.entityID, entity.stayBuildingID); }
public override void Enter(int preStateName) { base.Enter(preStateName); var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity; DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorStayFirstPosInEntryQueue.Enter", entity.entityID); DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName); DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} Play {1}", entity.entityID, Config.globalConfig.getInstace().VisitorIdle); entity.PlayActionAnim(Config.globalConfig.getInstace().VisitorIdle); isToVisitorStateChoseLittleZoo = false; shouldImmediateFinishEntryGateCheckInCD = false; accumulativeUpdateUITime = 0; if (checkInCD != null) { checkInCD.Stop(); } isRecvCDVal = false; isSendCDFinshed = false; MessageManager.GetInstance().Regist((int)GameMessageDefine.GetEntryGateDataReply, OnGetEntryGateDataReply); MessageManager.GetInstance().Regist((int)GameMessageDefine.EntryGateCheckInCDFinshedReply, OnEntryGateCheckInCDFinshedReply); MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, this.OnArrived); MessageManager.GetInstance().Regist((int)GameMessageDefine.ImmediateFinishEntryGateCheckInCD, OnImmediateFinishEntryGateCheckInCD); /* 模型到达售票口 调用新手引导的内容 显示步骤10 */ 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_10) { PageMgr.ShowPage <UIGuidePage>(); } else if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_9) { uIGuidePage.TAEvent_finish(); uIGuidePage.newBieGuild_step = NewBieGuild.Step_10; uIGuidePage.TAEvent_start((int)uIGuidePage.newBieGuild_step); //本阶段显示文本 uIGuidePage.TAEvent_process((int)uIGuidePage.newBieGuild_step); uIGuidePage.OnClickDialogBoxButton(); } } //进入这个状态开始计算游览cd GetEntryGateDataApply.Send(entity.entityID, entity.zooEntryID); }
private void RegistAllCompent() { GameObject camera = GlobalDataManager.GetInstance().zooGameSceneData.camera; //查找选择的相机 rotationCamera = camera.transform.Find("RotationCamera"); mainCamera = camera.transform.Find("main_camera"); buttonHide = AddCompentInChildren <Button>(buttonHide, "UIBg/UIShowGroup/OkButton"); buttonHide = RegistBtnAndClick("UIBg/UIShowGroup/OkButton", HideUI); buttonText = RegistCompent <Text>("UIBg/UIShowGroup/OkButton/ButtonText"); //GetTransPrefabText(buttonText); //新手引导手势组件 effectNode = RegistCompent <Transform>("UIBg/UIShowGroup/OkButton/effectNode"); if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true) { 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); UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>(); if (uIGuidePage == null) { string e = string.Format("新手引导界面 PageMgr.allPages里 UIGuidePage 为空"); throw new System.Exception(e); } uIGuidePage.TAEvent_finish((int)uIGuidePage.newBieGuild_step + 1); uIGuidePage.TAEvent_start((int)uIGuidePage.newBieGuild_step + 2); uIGuidePage.TAEvent_process((int)uIGuidePage.newBieGuild_step + 2); } }