public static void OpenMovieEx() { string pausedMusic = FusionAudio.StopMusic(); LTStoryController.OpenMovie(() => { if (LTCombatEventReceiver.Instance != null) { LTCombatEventReceiver.Instance.StoryOver(pausedMusic); } }, "LTPrologueVideo"); }
protected override IEnumerator WaitForPlayer() { LoadingSpinner.Show(); while (!MapCtrl.IsPlayerReady()) { yield return null; } LoadingSpinner.Hide(); while (isShowingBoxReward) { yield return null; } while (LTInstanceMapModel.Instance.EventList.Count > 0) { LTInstanceEvent evt = LTInstanceMapModel.Instance.EventList.Dequeue(); EB.Debug.Log("event: type = {0}, x = {1}, y = {2}, param = {3}", evt.Type, evt.x, evt.y, evt.Param); if (evt.Type == LTInstanceEvent.EVENT_TYPE_OPEN_BOX)//开箱 { OpenBox(evt.Param); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_HIDDEN)//密道 { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTChallengeInstanceHudController_18472")); LTInstanceMapModel.Instance.EventUpdateData(); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_DOOR_OPEN)//开开关 { FusionAudio.PostEvent("UI/New/JiGuan", true); LTInstanceMapModel.Instance.InitOpenDoor(evt.x, evt.y); var nodeObject = MapCtrl.GetNodeObjByPos(evt.x, evt.y); nodeObject?.OpenTheDoor(); MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTMainInstanceHudController_16229")); } //主线 else if (evt.Type == LTInstanceEvent.EVENT_TYPE_DIALOG)//剧情对话 { InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f); if (MapCtrl.isPlayerShow) ShowDialog(evt.Param); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_MOVIE)//剧情动画 { ShowMovie(evt.Param); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_PRAY_POINT)//神灯 { FusionAudio.PostEvent("UI/New/JianShenDeng", true); FlyFire(); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_PRAYPOINTFULL)//神灯已满 { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTMainInstanceHudController_15637")); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_PASSWORD)//显示密码 { FusionAudio.PostEvent("UI/New/Zhi", true); ShowPasswordView(evt.Param); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_HERO)//获得英雄 { OnGetHero(evt); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_MAIN_CAMP_OVER)//主线副本章节结束事件,回大地图 { FusionTelemetry.CampaignDate.PostEvent(FusionTelemetry.CampaignDate.Main, LTInstanceMapModel.Instance.GetMaxCampaignLevel().ToString(), 1, 1); while (IsPlayDialog) { yield return null; } if (!string.IsNullOrEmpty(mChapterTpl.AfterChapter)) { System.Action goMapAction = () => { GoBackWorldMap(); };//返回大地图 //章节结束可能会有剧情动画,也可能会有剧情对话,也可能会同时有; 用;截取,纯数字的就是剧情对话,顺序看配表的顺序 string[] strs = mChapterTpl.AfterChapter.Split(';'); int dialogueID = 0; if (!string.IsNullOrEmpty(strs[0])) { if (strs[0].IndexOf("Chapter") >= 0) { if (strs.Length > 1 && int.TryParse(strs[1], out dialogueID)) { System.Action afterChapterAction = () => { ShowDialog(dialogueID.ToString(), goMapAction); }; LTStoryController.OpenStory(afterChapterAction, strs[0]); } else { LTStoryController.OpenStory(goMapAction, strs[0]); } } else if (int.TryParse(strs[0], out dialogueID)) { if (strs.Length > 1 && strs[1].IndexOf("Chapter") >= 0) { System.Action afterPlayDiaAction = () => { LTStoryController.OpenStory(goMapAction, strs[1]); }; ShowDialog(dialogueID.ToString(), afterPlayDiaAction); } else { ShowDialog(dialogueID.ToString(), goMapAction); } } else { goMapAction(); } } } else { //除第一章之外其他章节完成 GoBackWorldMap(); } break; } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_MAIN_CAMP_OVER_NORETURN)//副本结束,不返回大地图 { //第一章完成 FusionTelemetry.CampaignDate.PostEvent(FusionTelemetry.CampaignDate.Main, LTInstanceMapModel.Instance.GetMaxCampaignLevel().ToString(), 1, 1); GlobalMenuManager.Instance.Open("LTStoryHud", "Chapter1_2");// 临时数据 } } }
public void OnChapterClick() { if (m_ChapterData.IsBoxRewardType()) { if (!LTInstanceUtil.IsChapterComplete(m_ChapterData.ForwardChapterId)) { int FC = 0; int.TryParse(m_ChapterData.ForwardChapterId, out FC); MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_INSTANCE_MAP_BOX_REWRAD_TIP2"), FC % 100)); return; } if (LTInstanceMapModel.Instance.GetMainChapterRewardState(m_ChapterData.Id)) { return; } LTInstanceMapModel.Instance.RequestMainChapterReward(m_ChapterData.Id, delegate { ContainerObj.CustomSetActive(false); GlobalMenuManager.Instance.Open("LTShowRewardView", m_ChapterData.RewardDataDic[0]); }); return; } FusionAudio.PostEvent("UI/General/ButtonClick", true); if (AllianceUtil.GetIsInTransferDart("ID_CAMPAGIN")) { return; } //此处判断进阶条件是否满足 if (!LTInstanceUtil.GetIsChapterLimitConditionComplete(m_ChapterData, out int currNum)) { //打开跳转界面 GlobalMenuManager.Instance.Open("PlayerUpgradeTipView", new int[3] { m_ChapterData.Limitparam2, m_ChapterData.Limitparam1, currNum }); return; } if (BalanceResourceUtil.GetUserLevel() < m_ChapterData.LevelLimit) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_codefont_in_LTInstanceMapChapterCtrl_2697"), m_ChapterData.LevelLimit)); //GlobalMenuManager.Instance.Open("LTPlayerLevelUpTipView", "Levelup"); return; } //主线章节入口 if (LTInstanceMapHudController.curChapterID != null && LTInstanceMapHudController.curChapterID != m_ChapterData.Id) { return; } LTInstanceMapHudController.curChapterID = m_ChapterData.Id; if (!string.IsNullOrEmpty(m_ChapterData.BeforeChapter)) { string flagStr = PlayerPrefs.GetString(LoginManager.Instance.LocalUserId.Value + m_ChapterData.BeforeChapter); if (string.IsNullOrEmpty(flagStr)) { LTStoryController.OpenStory(OnChapterClick, m_ChapterData.BeforeChapter); PlayerPrefs.SetString(LoginManager.Instance.LocalUserId.Value + m_ChapterData.BeforeChapter, "True");//本地临时保存,等服务器做好了会保存到服务器 PlayerPrefs.Save(); return; } } Action act = new Action(delegate { LTMainInstanceHudController.EnterInstance(m_ChapterData.Id); LTInstanceMapHudController.curChapterID = null; }); Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.PlayCloudFxEvent, act); }