コード例 #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>(EGameEvent.eGameEvent_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(EGameEvent.eGameEvent_GameOver))
     //{
     //    EventCenter.RemoveListener<CEvent>(EGameEvent.eGameEvent_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 void FinishTask(SecondaryTaskInfo task)//某个任务真正显示完成
 {
     taskDic.Remove(task.GetTaskId());
     task.Clean();
     task = null;
 }
コード例 #7
0
 public void CommitTask(SecondaryTaskInfo task)   //某个任务已经触发
 {
     CGLCtrl_GameLogic.Instance.EmsgToss_GuideFinishStep(task.GetTaskId(), 3);
 }
コード例 #8
0
 public virtual void OnEnter(SecondaryTaskInfo parent)
 {
     parentInfo = parent;
 }
コード例 #9
0
 public SecondaryTaskEffect(SecondaryTaskInfo taskInfo)
 {
     owner    = taskInfo;
     helpData = ConfigReader.GetGuideHelpInfo(owner.GetTaskId());
 }