Пример #1
0
 public void TimeOver()
 {
     if (m_ReviveTimes > 0)
     {
         Global.gApp.CurScene.Pause();
         FightResultManager.instance.ShowReivePopup((bool tmpR) =>
         {
             Global.gApp.CurScene.Resume();
             if (tmpR)
             {
                 m_ReviveTimes--;
                 BaseTaskMode nextTaskMode = GetCurTaskMode();
                 nextTaskMode.ResetTime();
             }
             else
             {
                 Global.gApp.CurScene.GameLose();
             }
         });
     }
     else
     {
         Global.gApp.CurScene.GameLose();
     }
 }
Пример #2
0
        public void TaskCompleted(int taskId)
        {
            BaseTaskMode taskMode = GetCurTaskMode();

            if (taskMode.GetIndex() == taskId)
            {
                int newIndex = m_CurTaskIndex + 1;
                if (newIndex == m_TaskModes.Count)
                {
                    Global.gApp.CurScene.GameWin();
                    return;
                }
                m_CurTaskIndex = newIndex;
                BaseTaskMode nextTaskMode = GetCurTaskMode();
                nextTaskMode.BeginTask();
            }
            else
            {
                Debug.Log("=== not is cur Task error=== ");
            }
        }