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