void TriggerTask() { IGuideTaskManager.Instance().SetCurTask(this); count = 0; StartTask(count); SetTaskState(TaskState.OpenState); }
public override void OnExecute() { if (pData == null || !pData.IsTriggerTask || !canCheckTriggerEnd) { return; } bool endTask = false; if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) { Touch touch = Input.GetTouch(0); endTask = (touch.phase == TouchPhase.Began); } else { endTask = Input.GetMouseButtonDown(0); } if (!endTask) { TimeSpan span = DateTime.Now - startTime; if (span.TotalSeconds >= ShowTime) { endTask = true; } } if (endTask) { canCheckTriggerEnd = false; IGuideTaskManager.Instance().SendTaskEnd(taskData.EndTaskEvent); } }
public static IGuideTaskManager Instance() { if (instance == null) { instance = new IGuideTaskManager(); } return(instance); }
protected override void OnEnd() { IGuideTaskManager.Instance().RemoveTriggerTask(this); // total task end; IGuideTaskManager.Instance().AddHasTriggerTask(taskId); HolyGameLogic.Instance.EmsgTocsAskFinishUIGuideTask(2, taskId, 1); }
void SkipNewsGuideEnd() { if (taskData.TaskId == newsGuideTaskId && playeType == SelectPlayerType.Old) { IGuideTaskManager.Instance().SendTaskTrigger((Int32)GameEventEnum.GameEvent_UIGuideTriggerMatchGame); IGuideTaskManager.Instance().SendTaskEffectShow((Int32)GameEventEnum.GameEvent_UIGuideMatchBtnEnd); } }
protected override void StartTask(int index) { base.StartTask(index); IGuideData data = ConfigReader.GetIGuideInfo(currentTask.GetTaskId()); IGuideTaskManager.Instance().SendTaskEffectShow(data.EndTaskEvent); IGuideTaskManager.Instance().AddHasTriggerTask(data.TaskId); HolyGameLogic.Instance.EmsgTocsAskFinishUIGuideTask(2, taskId, 0); }
private int GetFirstNoTrigerTaskId() { for (int i = 0; i < taskData.SonTaskList.Count; i++) { int id = taskData.SonTaskList.ElementAt(i); if (IGuideTaskManager.Instance().IsTaskTriggered(id)) { continue; } return(i); } return(-1); }
void SelectSkillNewsGuide(int ie, bool isPress) { DestroySkillNewsGuide(); playeType = (SelectPlayerType)ie; if (ie == 1) { IGuideTaskManager.Instance().SendTaskEnd(taskData.EndTaskEvent); } else { IGuideTaskManager.Instance().SendTaskEffectShow(taskData.EndTaskEvent); } }
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); }
protected virtual void OnEnd() { IGuideTaskManager.Instance().NextTask(); }
public void StartAsignedStep(int taskId) { IGuideTaskManager.Instance().SendTaskEnd((Int32)GameEventEnum.GameEvent_UIGuideNewsGuideEnd); sceneGuideTask.SetTaskStart(taskId); }