public override void OnExecute() { if (pData == null || !pData.IsTriggerTask || !canCheckTriggerEnd) { return; } bool endTask = false; if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.WP8Player) { 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((EGameEvent)taskData.EndTaskEvent); } }
void TriggerTask() { IGuideTaskManager.Instance().SetCurTask(this); count = 0; StartTask(count); SetTaskState(TaskState.OpenState); }
protected override void OnEnd() { IGuideTaskManager.Instance().RemoveTriggerTask(this); // total task end; IGuideTaskManager.Instance().AddHasTriggerTask(taskId); CGLCtrl_GameLogic.Instance.EmsgTocsAskFinishUIGuideTask(2, taskId, 1); }
void SkipNewsGuideEnd() { if (taskData.TaskId == newsGuideTaskId && playeType == SelectPlayerType.Old) { IGuideTaskManager.Instance().SendTaskTrigger(EGameEvent.eGameEvent_UIGuideTriggerMatchGame); IGuideTaskManager.Instance().SendTaskEffectShow(EGameEvent.eGameEvent_UIGuideMatchBtnEnd); } }
public static IGuideTaskManager Instance() { if (instance == null) { instance = new IGuideTaskManager(); } return(instance); }
protected override void StartTask(int index) { base.StartTask(index); IGuideData data = ConfigReader.GetIGuideInfo(currentTask.GetTaskId()); IGuideTaskManager.Instance().SendTaskEffectShow((EGameEvent)data.EndTaskEvent); IGuideTaskManager.Instance().AddHasTriggerTask(data.TaskId); CGLCtrl_GameLogic.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((EGameEvent)taskData.EndTaskEvent); } else { IGuideTaskManager.Instance().SendTaskEffectShow((EGameEvent)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 <CEvent>((EGameEvent)taskData.EndTaskEvent, OnTrigger); IGuideTaskManager.Instance().SendTaskStart((EGameEvent)taskData.EndTaskEvent, (EGameEvent)taskData.StartTaskEvent); }
protected virtual void OnEnd() { IGuideTaskManager.Instance().NextTask(); }
public void StartAsignedStep(int taskId) { IGuideTaskManager.Instance().SendTaskEnd(EGameEvent.eGameEvent_UIGuideNewsGuideEnd); sceneGuideTask.SetTaskStart(taskId); }