示例#1
0
 void TriggerTask()
 {
     IGuideTaskManager.Instance().SetCurTask(this);
     count = 0;
     StartTask(count);
     SetTaskState(TaskState.OpenState);
 }
示例#2
0
        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);
            }
        }
示例#3
0
 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);
        }
示例#5
0
 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);
 }
示例#8
0
 void SelectSkillNewsGuide(int ie, bool isPress)
 {
     DestroySkillNewsGuide();
     playeType = (SelectPlayerType)ie;
     if (ie == 1)
     {
         IGuideTaskManager.Instance().SendTaskEnd(taskData.EndTaskEvent);
     }
     else
     {
         IGuideTaskManager.Instance().SendTaskEffectShow(taskData.EndTaskEvent);
     }
 }
示例#9
0
        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);
        }
示例#10
0
 protected virtual void OnEnd()
 {
     IGuideTaskManager.Instance().NextTask();
 }
示例#11
0
 public void StartAsignedStep(int taskId)
 {
     IGuideTaskManager.Instance().SendTaskEnd((Int32)GameEventEnum.GameEvent_UIGuideNewsGuideEnd);
     sceneGuideTask.SetTaskStart(taskId);
 }