public void OnEnter() { taskData = ConfigReader.GetIGuideInfo(taskId); if (iParent.GetIGuideTaskData().IsTriggerTask) { effect = new IGuideTriggerTaskEffect(iParent.GetIGuideTaskData( ), taskId); } else { effect = new IGuideTaskEffect(iParent.GetIGuideTaskData(), taskId); } EventCenter.AddListener <FEvent>(taskData.EndTaskEvent, OnTrigger); IGuideTaskManager.Instance().SendTaskStart(taskData.EndTaskEvent, taskData.StartTaskEvent); }
public void NextTask() { if (curTask == null) { return; } IGuideManagerData data = curTask.GetIGuideTaskData(); curTask = null; LoadUiResource.DestroyLoad(GameConstDefine.UIGuideRestPath); if (data.NextTaskId.ElementAt(0) == -1) { //ask all end HolyGameLogic.Instance.EmsgTocsAskFinishUIGuideTask(1, data.TaskId, 1); data = null; StartTriggerTask(); SetTaskIsFinish(true, true); return; } // ask end HolyGameLogic.Instance.EmsgTocsAskFinishUIGuideTask(1, data.TaskId, 0); for (int i = 0; i < data.NextTaskId.Count; i++) { SetTaskId(data.NextTaskId.ElementAt(i)); } data = null; }