/// <summary> /// 烹饪游戏剧情触发 /// </summary> /// <param name="gameCookingData"></param> /// <param name="id"></param> public bool EventTriggerForStoryCooking(MiniGameCookingBean gameCookingData, long id) { StoryInfoBean storyInfo = StoryInfoHandler.Instance.manager.GetStoryInfoDataById(id); if (storyInfo == null) { return(false); } this.storyInfo = storyInfo; SetEventStatus(EventStatusEnum.EventIng); SetEventType(EventTypeEnum.StoryForMiniGameCooking); //控制模式修改 BaseControl baseControl = GameControlHandler.Instance.StartControl <ControlForStoryCpt>(GameControlHandler.ControlEnum.Story); baseControl.transform.position = new Vector3(storyInfo.position_x, storyInfo.position_y); UIHandler.Instance.manager.CloseAllUI(); //设置文本的回调 UIGameText uiGameText = UIHandler.Instance.manager.GetUI <UIGameText>(UIEnum.GameText); uiGameText.SetCallBack(this); //设置文本的备用数据 SortedList <string, string> listMarkData = GetMiniGameMarkStrData(gameCookingData); uiGameText.SetListMark(listMarkData); StoryInfoHandler.Instance.builderForStory.BuildStory(storyInfo); return(true); }
/// <summary> /// 剧情触发 /// </summary> /// <param name="markId"></param> public bool EventTriggerForStory(StoryInfoBean storyInfo) { if (!CheckEventTrigger()) { return(false); } this.storyInfo = storyInfo; SetEventStatus(EventStatusEnum.EventIng); SetEventType(EventTypeEnum.Story); //暂停时间 GameTimeHandler.Instance.SetTimeStop(); //控制模式修改 BaseControl baseControl = GameControlHandler.Instance.StartControl <ControlForStoryCpt>(GameControlHandler.ControlEnum.Story); baseControl.transform.position = new Vector3(storyInfo.position_x, storyInfo.position_y); //隐藏重要NPC if (NpcHandler.Instance.buildForImportant != null) { NpcHandler.Instance.buildForImportant.HideNpc(); } if (NpcHandler.Instance.builderForFamily != null) { NpcHandler.Instance.builderForFamily.HideNpc(); } UIHandler.Instance.manager.CloseAllUI(); //设置文本的回调 UIGameText uiGameText = UIHandler.Instance.manager.GetUI <UIGameText>(UIEnum.GameText); uiGameText.SetCallBack(this); StoryInfoHandler.Instance.builderForStory.BuildStory(storyInfo); return(true); }
/// <summary> /// 调查事件触发 /// </summary> /// <param name="markId"></param> public bool EventTriggerForLook(long markId) { if (!CheckEventTrigger()) { return(false); } SetEventStatus(EventStatusEnum.EventIng); SetEventType(EventTypeEnum.Look); //暂停时间 GameTimeHandler.Instance.SetTimeStop(); //控制模式修改 GameControlHandler.Instance.StopControl(); UIGameText uiGameText = UIHandler.Instance.manager.OpenUIAndCloseOther <UIGameText>(UIEnum.GameText); uiGameText.SetCallBack(this); uiGameText.SetData(TextEnum.Look, markId); return(true); }
/// <summary> /// 对话事件触发 /// </summary> /// <param name="markId"></param> public bool EventTriggerForTalk(NpcInfoBean npcInfo, bool isStopTime) { if (!CheckEventTrigger()) { return(false); } SetEventStatus(EventStatusEnum.EventIng); SetEventType(EventTypeEnum.Talk); //暂停时间 if (isStopTime) { GameTimeHandler.Instance.SetTimeStop(); } //控制模式修改 GameControlHandler.Instance.StopControl(); UIGameText uiGameText = UIHandler.Instance.manager.OpenUIAndCloseOther <UIGameText>(UIEnum.GameText); uiGameText.SetDataForTalk(npcInfo); uiGameText.SetCallBack(this); return(true); }