public void OnUpdate()
 {
     for (int i = taskDic.Count - 1; i >= 0; i--)
     {
         SecondaryTaskInfo info = taskDic.ElementAt(i).Value;
         if (info == null)
         {
             continue;
         }
         info.OnUpdate();
     }
 }
 public void StartAllTask()
 {
     //EventCenter.AddListener<CEvent>((Int32)GameEventEnum.GameEvent_GameOver, OnGameOver);
     if (taskDic == null || taskDic.Count == 0)
     {
         return;
     }
     for (int i = taskDic.Count - 1; i >= 0; i--)
     {
         SecondaryTaskInfo taskInfo = taskDic.ElementAt(i).Value;
         taskInfo.OnEnter();
     }
 }
 public void CleanAll()
 {
     for (int i = taskDic.Count - 1; i >= 0; i--)
     {
         SecondaryTaskInfo info = taskDic.ElementAt(i).Value;
         if (info == null)
         {
             continue;
         }
         FinishTask(info);
     }
     //if (EventCenter.mEventTable.ContainsKey((Int32)GameEventEnum.GameEvent_GameOver))
     //{
     //    EventCenter.RemoveListener<CEvent>((Int32)GameEventEnum.GameEvent_GameOver, OnGameOver);
     //}
 }
        public void InitFinishTask(int task, int matches)
        {
            GuideHelpData data = ConfigReader.GetGuideHelpInfo(task);

            if (data == null || data.helpMatches <= matches)
            {
                return;
            }
            if (taskDic.ContainsKey(task))
            {
                GameMethod.DebugError("secondary guide repeat");
                return;
            }
            SecondaryTaskInfo taskInfo = new SecondaryTaskInfo();

            taskInfo.InitTaskInfo(task, 0, matches);
            taskDic.Add(task, taskInfo);
        }
 public override void OnEnter(SecondaryTaskInfo parent)
 {
     base.OnEnter(parent);
     AddCheckListener();
 }
Exemplo n.º 6
0
 public virtual void OnEnter(SecondaryTaskInfo parent)
 {
     parentInfo = parent;
 }
Exemplo n.º 7
0
 public SecondaryTaskEffect(SecondaryTaskInfo taskInfo)
 {
     owner    = taskInfo;
     helpData = ConfigReader.GetGuideHelpInfo(owner.GetTaskId());
 }
 public void FinishTask(SecondaryTaskInfo task)//某个任务真正显示完成
 {
     taskDic.Remove(task.GetTaskId());
     task.Clean();
     task = null;
 }
 public void CommitTask(SecondaryTaskInfo task)   //某个任务已经触发
 {
     HolyGameLogic.Instance.EmsgToss_GuideFinishStep(task.GetTaskId(), 3);
 }