예제 #1
0
 public void OnUpdate()
 {
     for (int i = taskDic.Count - 1; i >= 0; i--)
     {
         SecondaryTaskInfo info = taskDic.ElementAt(i).Value;
         if (info == null)
         {
             continue;
         }
         info.OnUpdate();
     }
 }
예제 #2
0
 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();
     }
 }
예제 #3
0
 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);
     //}
 }
예제 #4
0
        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);
        }
예제 #5
0
 public override void OnEnter(SecondaryTaskInfo parent)
 {
     base.OnEnter(parent);
     AddCheckListener();
 }
예제 #6
0
 public SecondaryTaskEffect(SecondaryTaskInfo taskInfo)
 {
     owner    = taskInfo;
     helpData = ConfigReader.GetGuideHelpInfo(owner.GetTaskId());
 }
예제 #7
0
 public void FinishTask(SecondaryTaskInfo task)//某个任务真正显示完成
 {
     taskDic.Remove(task.GetTaskId());
     task.Clean();
     task = null;
 }
예제 #8
0
 public void CommitTask(SecondaryTaskInfo task)   //某个任务已经触发
 {
     HolyGameLogic.Instance.EmsgToss_GuideFinishStep(task.GetTaskId(), 3);
 }
예제 #9
0
 public virtual void OnEnter(SecondaryTaskInfo parent)
 {
     parentInfo = parent;
 }