Example #1
0
        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;
        }
Example #2
0
 public void SetCurTask(IGuideTaskList task)
 {
     curTask = task;
     for (int i = 0; i < currentCheckTask.Count; i++)
     {
         if (currentCheckTask.ElementAt(i) == curTask)
         {
             return;
         }
         currentCheckTask.ElementAt(i).Clean();
     }
     currentCheckTask.Clear();
 }
Example #3
0
        public void SetTaskId(int taskId)
        {
            for (int i = 0; i < currentCheckTask.Count; i++)
            {
                if (currentCheckTask.ElementAt(i).GetTaskId() == taskId)
                {
                    return;
                }
                currentCheckTask.ElementAt(i).Clean();
                IGuideTaskList task = currentCheckTask.ElementAt(i);
                task = null;
            }
            currentCheckTask.Clear();

            IGuideTaskList iTask = new IGuideTaskList(taskId);

            iTask.OnEnter();
            currentCheckTask.Add(iTask);
        }
Example #4
0
 public void RemoveTriggerTask(IGuideTaskList task)// if one trigger task finish ,remove update
 {
     triggerTaskList.Remove(task);
     task = null;
 }
 public IGuideTask(IGuideTaskList parent, int id)
 {
     taskId  = id;
     iParent = parent;
 }