private void OnGetHero(LTInstanceEvent evt) { Instance.LTInstanceFloorTemp tmp = MapCtrl.GetNodeObjByPos(new Vector2(evt.x, evt.y)) as Instance.LTInstanceFloorTemp; if (tmp != null) { tmp.HideNotice(); } }
private void OnGuide(LTInstanceEvent evt) { Instance.LTInstanceFloorTemp tmp = MapCtrl.GetNodeObjByPos(new Vector2(evt.x, evt.y)) as Instance.LTInstanceFloorTemp; if (tmp != null) { int roleId = EB.Dot.Integer("id", evt.Param, 0); tmp.ShowNotice(roleId); } }
private IEnumerator OnBombUpdateSpFxEnd(LTInstanceEvent evt) { yield return(m_Wait); MapCtrl.ShowTrapTrigger(); MagicAlphaTween.ResetToBeginning(); MagicAlphaTween.PlayForward(); SpCtrl.UpdateSp(LTChallengeSPCtrl.SPEventType.REMOVE); }
/// <summary> /// 魔力炸弹表现结束 /// </summary> /// <param name="evt"></param> /// <returns></returns> private IEnumerator OnBombUpdateSpFxEnd(LTInstanceEvent evt) { yield return(m_Wait); MapCtrl.ShowTrapTrigger(); MagicAlphaTween.ResetToBeginning(); MagicAlphaTween.PlayForward(); SpCtrl.UpdateSp(LTChallengeSPCtrl.SPEventType.REMOVE); yield return(m_Wait); // SPBombFxCom.gameObject.CustomSetActive(false); }
private void ShowBombUpdateSpFx(LTInstanceEvent evt) { // SPBombFxCom.gameObject.CustomSetActive(true); Hotfix_LT.Instance.LTInstanceOptimizeManager.Instance.HoldPlayerEffect("fx_fb_UI_Anniu_Boom_lan"); StartCoroutine(OnBombUpdateSpFxEnd(evt)); }
protected override IEnumerator WaitForPlayer() { LoadingSpinner.Show(); while (!MapCtrl.IsPlayerReady()) { yield return(null); } LoadingSpinner.Hide(); 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, evt.x, evt.y); } 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(); if (evt.Param != null && evt.Param.Equals("exit")) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTChallengeInstanceHudController_17782")); } else { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTChallengeInstanceHudController_17940")); } } //挑战 else if (evt.Type == LTInstanceEvent.EVENT_TYPE_HEAL_TRIGGER)//医疗 { FusionAudio.PostEvent("UI/New/HuiFu", true); // MapCtrl.ShowHealTrigger(); Hotfix_LT.Instance.LTInstanceOptimizeManager.Instance.HoldPlayerEffect("fx_fb_fanzhuan_jiaxue"); HpCtrl.UpdateHp(LTChallengeInstanceHpCtrl.HPEventType.ADD, evt.HasHPInfoData, evt.Param); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_BOMB)//炸弹 { FusionAudio.PostEvent("UI/New/explode", true); ShowBombUpdateHpFx(evt.Param, evt.HasHPInfoData, LTChallengeInstanceHpCtrl.HPEventType.BOOM); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_TRAP_TRIGGER)//陷阱 { MapCtrl.ShowTrapTrigger(); FusionAudio.PostEvent("UI/New/explode", true); ShowBombUpdateHpFx(evt.Param, evt.HasHPInfoData, LTChallengeInstanceHpCtrl.HPEventType.REMOVE); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_MANA_TRAP_TRIGGER)//魔力陷阱 { FusionAudio.PostEvent("UI/New/explode", true); ShowBombUpdateSpFx(evt); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_EXIT_POINT)//副本传送门 { var nodeData = LTInstanceMapModel.Instance.GetNodeByPos(evt.x, evt.y); GlobalMenuManager.Instance.Open("LTChallengeInstancePortalView", nodeData.RoleData.Param.Count > 0 && nodeData.RoleData.Param[0] == "BOSS"); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_CHALLENGE_FAIL)//挑战副本失败 { Hashtable table = Johny.HashtablePool.Claim(); table["flag"] = false; System.Action <int> action = OnDefaultViewClose; table["action"] = action; table["isConfirm"] = false; GlobalMenuManager.Instance.Open("LTChallengeInstanceDefaultView", table); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_MANA_REGEN)//魔力药水 { FusionAudio.PostEvent("UI/New/YaoShui", true); MagicFly(FlyMagicObj, OnMagicFlyEnd); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_MANA_REGEN_FACTOR)//魔力袋 { FusionAudio.PostEvent("UI/New/YaoShui", true); MagicFly(FlyMagicsObj, OnMagicsFlyEnd); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_DICE)//色子 { LoadDice(evt.Param, delegate(int num) { FlyScroll(); }); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_LUCK)//幸运色子 { LoadDice(evt.Param, delegate(int num) { }); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_SHOP)//商店 { if (!MapCtrl.HasNext()) { FusionAudio.PostEvent("UI/New/Mai", true); GlobalMenuManager.Instance.Open("LTChallengeInstanceShopView", evt); } } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_SHOPREFRESH)//商店刷新 { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTChallengeInstanceShopCtrl_4116")); Hotfix_LT.Messenger.Raise(EventName.ChallengeInstanceBuySucc, evt.Param); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_GETSCROLL)//技能卷轴 { FusionAudio.PostEvent("UI/New/Zhi", true); FlyScroll(); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_HUNTERMARK)//猎人印记 { FusionAudio.PostEvent("UI/New/SuoDing", true); PLayMagnifyingGlassAni(); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_EXITLOCKED)//被封印传送门 { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTChallengeInstanceHudController_18812")); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_EXITLOCKED2)//钥匙传送门 { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_CHALLENGE_INSTANCE_NEED_KEY")); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_GUIDE)//新元素 { OnGuide(evt); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_WHEEL)//幸运转盘 { Hashtable data = Johny.HashtablePool.Claim(); data.Add("type", LTInstanceConfig.InChallengeState); data.Add("x", evt.x); data.Add("y", evt.y); data.Add("callback", new System.Action(delegate { LTInstanceMapModel.Instance.RequestGetChapterState(); })); GlobalMenuManager.Instance.Open("LTChallengeInstanceTurntableView", data); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_DAMAGE)//瘟疫 { if (stAct_WY == null || stAct_WY.IsFinished) { stAct_WY = Hotfix_LT.Instance.LTInstanceOptimizeManager.Instance.HoldPlayerEffect("fx_fb_fanzhuan_wenyi"); } MapCtrl.ShowTrapTrigger(); HpCtrl.UpdateHp(LTChallengeInstanceHpCtrl.HPEventType.WENYI, evt.HasHPInfoData, evt.Param); } else if (evt.Type == LTInstanceEvent.EVENT_TYPE_HEAL)//生机 { if (stAct_SJ == null || stAct_SJ.IsFinished) { stAct_SJ = Hotfix_LT.Instance.LTInstanceOptimizeManager.Instance.HoldPlayerEffect("fx_fb_fanzhuan_jiaxue"); } HpCtrl.UpdateHp(LTChallengeInstanceHpCtrl.HPEventType.SHENGJI, evt.HasHPInfoData, evt.Param); } } }
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");// 临时数据 } } }
private void ShowBombUpdateSpFx(LTInstanceEvent evt) { Hotfix_LT.Instance.LTInstanceOptimizeManager.Instance.HoldPlayerEffect("fx_fb_UI_Anniu_Boom_lan"); StartCoroutine(OnBombUpdateSpFxEnd(evt)); }