private void DialogueFinish() { if (m_guideToolState) { m_guideToolState = false; GuideObj.CustomSetActive(true); if (GuideNodeManager.ExecuteGuideAudio != null) { GuideNodeManager.ExecuteGuideAudio(true); } } try { m_state = false; controller.Close(); m_Panel.enabled = false; DoFinishCallBack(); } catch (System.Exception e) { EB.Debug.LogError(e.StackTrace); DoFinishCallBack(); } }
public override void OnCancelButtonClick() { if (isMoving) { return; } //新手引导特殊处理 if (GuideNodeManager.IsGuide && !LTInstanceUtil.IsFirstChapterCompleted()) { if (clickCount >= 3) { clickCount = 0; MessageTemplateManager.ShowMessage(901099, null, delegate(int result) { if (result == 0) { GuideNodeManager.currentGuideId = 0; GuideNodeManager.GetInstance().JumpGuide();//跳过主线 } return; }); } clickCount++; MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString(GuideNodeManager.GUIDE_CANNOT_RETURN)); return; } GlobalMenuManager.Instance.RemoveCache("LTInstanceMapHud"); base.OnCancelButtonClick(); }
public static GuideNodeManager GetInstance() { if (_instance == null) { _instance = LTHotfixManager.GetManager <GuideNodeManager>(); } return(_instance); }
private bool OnComplete() { if (!sceneLoaded || !hudLoaded) { return(false); } if (!DataLookupsCache.Instance.SearchDataByID <string>("playstate.state", out playState)) { EB.Debug.LogWarning("DataLookupsCache ===> playstate.state can't find!"); } if (string.Compare(playState, PlayState.PlayState_Combat) == 0) //若是战斗场景就进入战斗场景 { int combat_session_id = -1; DataLookupsCache.Instance.SearchIntByID("playstate.Combat.combat_id", out combat_session_id); MainLandLogic.GetInstance().RequestResumeCombat(combat_session_id); int type = -1; DataLookupsCache.Instance.SearchIntByID("playstate.Combat.origin.combatType", out type); BattleReadyHudController.SetBattleType((eBattleType)type); if (type == (int)eBattleType.HeroBattle) { LTNewHeroBattleManager.GetInstance().OnLoggedIn(); } return(false); } else if (string.Compare(playState, PlayState.PlayState_InitCombat) == 0) //(合服状态也会变为init,因此新增新手引导字段判断)若是首次登录就申请开场大战 { UIStack.Instance.ShowLoadingScreen(() => { CombatCamera.isBoss = true; if (GuideNodeManager.isFirstCombatGuide()) { GuideNodeManager.GetInstance().GetGuideNodeCompleted(delegate(bool success) { if (success) { MainLandLogic.GetInstance().RequestFastCombatTransition(eBattleType.FastCampaignBattle, "1_1"); } else { MainLandLogic.GetInstance().RequestTransfer(SceneManager.MainLandName, Vector3.zero, 0, SceneManager.MainLandName, SceneManager.HeroStart, 0); } }); } else { MainLandLogic.GetInstance().RequestTransfer(SceneManager.MainLandName, Vector3.zero, 0, SceneManager.MainLandName, SceneManager.HeroStart, 0); } }, false, true); return(false); } return(true); }
private void OnMainLandSceneLoaded(SceneRootEntry sceneRoot) { m_State = PlayState.PlayState_MainLand; if (!DataLookupsCache.Instance.SearchDataByID <string>("playstate.state", out m_State)) { EB.Debug.LogWarning("DataLookupsCache ===> playstate.state can't find!"); } string state = m_State; if (string.Compare(state, PlayState.PlayState_InitCombat) == 0) //初始(合服状态也会变为init,因此新增新手引导字段判断) { if (GuideNodeManager.isFirstCombatGuide()) { GuideNodeManager.GetInstance().GetGuideNodeCompleted(delegate(bool success) { if (success) { MainLandLogic.GetInstance().RequestFastCombatTransition(eBattleType.FastCampaignBattle, "1_1"); } else { MainLandLogic.GetInstance().RequestTransfer(SceneManager.MainLandName, Vector3.zero, 0, SceneManager.MainLandName, SceneManager.HeroStart, 0); } }); } else { MainLandLogic.GetInstance().RequestTransfer(SceneManager.MainLandName, Vector3.zero, 0, SceneManager.MainLandName, SceneManager.HeroStart, 0); } } else if (string.Compare(state, PlayState.PlayState_MainLand) == 0) //主城 { Hashtable mainland_session = null; DataLookupsCache.Instance.SearchDataByID <Hashtable>("mainlands", out mainland_session); if (mainland_session != null) { MainLandLogic.GetInstance().OnSceneEnter(mainland_session); } } else if (string.Compare(state, PlayState.PlayState_LCCampaign) == 0)//副本 { if (GameFlowControlManager.Instance != null) { GameFlowControlManager.Instance.SendEvent("GoToInstanceView"); } } else if (string.Compare(state, PlayState.PlayState_Combat) == 0)//战斗 { if (GameFlowControlManager.Instance != null) { GameFlowControlManager.Instance.SendEvent("GoToMainLandView"); } } }
public void JumpGuide() { InputBlockerManager.Instance.UnBlock(InputBlockReason.CONVERT_FLY_ANIM); MengBanController.Instance.UnFobiddenAll(); MengBanController.Instance.Hide(); GuideToolController.Instance.Hide(); //这是全跳过(仅跳过该组的引导) GuideNodeManager.IsGuide = false; GuideNodeManager.GetInstance().MainClose(); currentGuideId = -1; }
public override void OnCancelButtonClick() { FusionAudio.PostEvent("UI/General/ButtonClick"); if (!MapCtrl.IsPlayerReady() || LTInstanceMapModel.Instance.moveResultList.Count > 0) { return; } MapCtrl.InstanceWaitUpdataMap(delegate { MapCtrl.ClearMoveActionList(); if (GuideNodeManager.IsGuide && !LTInstanceUtil.IsFirstChapterCompleted()) { if (clickCount >= 3) { clickCount = 0; MessageTemplateManager.ShowMessage(901099, null, delegate (int result) { if (result == 0) { GuideNodeManager.currentGuideId = 0; GuideNodeManager.GetInstance().JumpGuide();//跳过主线 } return; }); } clickCount++; MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString(GuideNodeManager.GUIDE_CANNOT_RETURN)); return; } if (LTInstanceMapModel.Instance.NotMainChapterId()) { if (LTInstanceMapModel.Instance.IsInsatnceViewAction()) { LTInstanceMapModel.Instance.SwitchViewAction(false, true, delegate { if(controller!=null) controller.Close(); }); } return; } LTInstanceMapModel.Instance.ClearInstanceData(); LTInstanceMapModel.Instance.RequestLeaveChapter("main", delegate { if (LTInstanceMapModel.Instance.IsInsatnceViewAction()) { LTInstanceMapModel.Instance.SwitchViewAction(false, true, delegate { if (controller != null) controller.Close(); }); } }); }); }
public override void OnEnter() { base.OnEnter(); MessageDialog.HideCurrent(); FlowControlAction.onLoadComplete = LoadCompleteExtend; StartInitialize(); PSPoolManager.Instance.LoadStandardHudFX(); if (GuideNodeManager.ExecuteJump != null) { GuideNodeManager.ExecuteJump(NodeMessageManager.ForbidInstanceFloor); GuideNodeManager.ExecuteJump(NodeMessageManager.ForbidOther); } }
public override void OnDisable() { base.OnDisable(); if (m_guideToolState) { m_guideToolState = false; GuideObj.CustomSetActive(true); if (GuideNodeManager.ExecuteGuideAudio != null) { GuideNodeManager.ExecuteGuideAudio(true); } } }
public override IEnumerator OnAddToStack() { if (GuideObj.activeSelf) { m_guideToolState = true; GuideObj.CustomSetActive(false); if (GuideNodeManager.ExecuteGuideAudio != null) { GuideNodeManager.ExecuteGuideAudio(false); } } yield return(base.OnAddToStack()); GlobalMenuManager.Instance.CloseMenu("LTMainInstanceLampView"); FusionAudio.StartBGM(); }
private void GetGuideComplete(string strGuideNode) { int guideNodeID = 0; int.TryParse(strGuideNode, out guideNodeID); string result = NodeMessageManager.Fail; if (guideNodeID != 0) { GuideNode node = GuideNodeManager.GetInstance().GetNode(guideNodeID); if (node == null) { EB.Debug.LogError("GetGuideComplete guidNode == null guideNodeStepID={0}", guideNodeID); } else { if (GuideNodeManager.GetInstance().IsLinkCompleted(node)) { result = NodeMessageManager.Sucess; } } } else { string[] split = strGuideNode.Split(','); for (int i = 0; i < split.Length; i++) { guideNodeID = int.Parse(split[i]); GuideNode node = GuideNodeManager.GetInstance().GetNode(guideNodeID); if (node == null) { EB.Debug.LogError("GetGuideComplete guidNode == null guideNodeStepID={0}", guideNodeID); } else { if (GuideNodeManager.GetInstance().IsLinkCompleted(node)) { result = NodeMessageManager.Sucess; break; } } } } DispatchConditionReceipt(NodeMessageManager.GetGuideComplete, result); }
public override IEnumerator OnRemoveFromStack() { m_DialogueFrame.m_Left.m_SpriteIcon.spriteName = string.Empty; m_DialogueFrame.m_Right.m_SpriteIcon.spriteName = string.Empty; m_DialogueFrame.m_Left.mDMono.gameObject.CustomSetActive(false); m_DialogueFrame.m_Right.mDMono.gameObject.CustomSetActive(false); FusionAudio.StopBGM(); if (GlobalMenuManager.Instance != null) { GlobalMenuManager.Instance.RemoveOpenController(controller); } if (m_guideToolState) { m_guideToolState = false; GuideObj.CustomSetActive(true); if (GuideNodeManager.ExecuteGuideAudio != null) { GuideNodeManager.ExecuteGuideAudio(true); } } return(base.OnRemoveFromStack()); }
public void OnScreenClick() { if (GuideManager.Instance.GuidNowAnchor() != eTipAnchorType.center) { if (can_finish) { } } else { if (Time.time - last_click_time <= click_delt) { fast_clicks++; } else { fast_clicks = 1; } last_click_time = Time.time; if (fast_clicks >= max_clicks) { fast_clicks = 0; if (GameStateManager.Instance != null) { /* GameStateLoadGame loadState = GameStateManager.Instance.GetGameState<GameStateLoadGame>(); * if (loadState != null && loadState.flowMgr != null && loadState.flowMgr.m_StateMachine != null) playstate = loadState.flowMgr.m_StateMachine.Fsm.ActiveStateName; * if (!playstate.Equals("CombatView")) * {*///移除战斗界面跳过机制 /*switch (GuideNodeManager.currentGuideId) * { * case 0: * {*/ MessageTemplateManager.ShowMessage(901099, null, delegate(int result) { if (result == 0) { GuideNodeManager.GetInstance().JumpGuide(); } }); /* } break; * default: * { * MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_2, EB.Localizer.GetString("ID_codefont_in_FocusEffectController_2664"), delegate (int result) * { * if (result == 0) * { * GuideNodeManager.GetInstance().JumpGuide(); * } * }); * } break; * }*/ // } } } if (!state) { Play(Input.mousePosition); } } }
void UpdatePos() { //if (CommonConditionParse.FocusViewName == "LTMainMenu" && m_Middle.transform.localPosition.x > (float)UIRoot.list[0].manualWidth / 2f)//主城场景下,判断手指是否在屏幕外 //{ // if (NpcUIExit_timer <= 2) // { // NpcUIExit_timer += EB.Time.deltaTime; // } // else // { // NpcUIExit_timer = 0; // if (PlayerController.onCollisionExit != null) // { // PlayerController.CurNpcCollision = null; // PlayerController.onCollisionExit(GuideNodeManager.GUIDE_FUNCTION_OPEN); // } // } //} if (!m_State) { return; } if (m_TargetWidget == null && m_TargetObject == null) { return; } if (isFobidden && NeedUnFobiddenAll) { if (framelazytoUnFrobidden <= 0) { framelazytoUnFrobidden++; } else { framelazytoUnFrobidden = 0; NeedUnFobiddenAll = false; UnFobiddenAll(); } } if (m_TargetObject != null) { if (m_TargetObject.activeInHierarchy) { Vector3 position = m_TargetObject.transform.TransformPoint(Vector3.zero); Vector3 screen_point = Camera.main.WorldToScreenPoint(position); float screenHeight = Screen.height; float screenWidth = Screen.width; float screenScale = 1.0f; if (UIRoot.list[0].fitHeight) { screenScale = (float)UIRoot.list[0].manualHeight / (float)screenHeight; } else { screenScale = (float)UIRoot.list[0].manualWidth / (float)screenWidth; } screen_point.x -= screenWidth / 2; screen_point.y -= screenHeight / 2; screen_point *= screenScale; screen_point.z = 0; m_Middle.transform.localPosition = screen_point; m_Middle.pivot = UIWidget.Pivot.Center; m_Middle.width = 200; m_Middle.height = 200; m_Middle.gameObject.CustomSetActive(true); m_Container.CustomSetActive(true); } else { m_Container.CustomSetActive(false); } } else { m_Middle.gameObject.CustomSetActive(true); m_Middle.transform.position = m_TargetWidget.transform.position; m_Middle.pivot = m_TargetWidget.pivot; m_Middle.width = m_TargetWidget.width; m_Middle.height = m_TargetWidget.height; m_MiddleCollider.size = new Vector3(m_Middle.width, m_Middle.height, 0); m_MiddleCollider.center = m_Middle.localCenter; m_Arrow.gameObject.CustomSetActive(true); m_Container.CustomSetActive(true); } if (FingerJudgeStr != null)// { if (FingerJudgeObj == null) { FingerJudgeObj = m_TargetWidget.transform.Find(FingerJudgeStr).gameObject; } if (FingerJudgeObj == null || !FingerJudgeObj.activeInHierarchy) { if (GuideNodeManager.ExecuteJump != null) { FingerJudgeStr = null; GuideNodeManager.ExecuteJump(NodeMessageManager.ForbidInstanceFloor); GuideNodeManager.ExecuteJump(NodeMessageManager.ForbidOther); } } } }