Ejemplo n.º 1
0
    IEnumerator PlayGameRoutine()
    {
        while (!m_isGameOver)
        {
            m_isGameOver = m_levelGoal.IsGameOver();

            m_isWinner = m_levelGoal.IsWinner();

            yield return(null);
        }
    }
Ejemplo n.º 2
0
    // coroutine for game play
    IEnumerator PlayGameRoutine()
    {
        // while the end game condition is not true, we keep playing
        // just keep waiting one frame and checking for game conditions
        //Debug.Log("is game over: " + m_isGameOver);
        while (!m_isGameOver)
        {
            m_isGameOver = m_levelGoal.IsGameOver();
            m_isWinner   = m_levelGoal.IsWinner();

            // wait one frame
            yield return(null);
        }
    }
Ejemplo n.º 3
0
 IEnumerator PlayGameRoutine()
 {
     if (m_levelGoalTimed)
     {
         m_levelGoalTimed.StartCountdown(); //(m_levelGoal as LevelGoalTimed).StartCountdown();
     }
     //while the end game condition is not true, keep playing
     //keep waiting a frame and check game condition
     while (!IsGameOver)
     {
         IsGameOver = m_levelGoal.IsGameOver();
         m_isWinner = m_levelGoal.IsWinner();
         yield return(null);
     }
 }
Ejemplo n.º 4
0
    IEnumerator PlayGameRoutine()
    {
        if (m_levelGoal.levelCounter == LevelCounter.Timer)
        {
            m_levelGoal.StartCountdown();
        }

        while (!m_isGameOver)
        {
            m_isGameOver = m_levelGoal.IsGameOver();

            m_isWinner = m_levelGoal.IsWinner();

            yield return(null);
        }
    }
Ejemplo n.º 5
0
  IEnumerator PlayGameRoutine()
  {
      if (m_levelGoal.levelCounter == LevelCounter.Timer)
      {
          m_levelGoal.StartCountdown();       //it runs every level uses timer.
      }


      while (!m_isGameOver)
      {
          m_isGameOver = m_levelGoal.IsGameOver();
          m_isWinner   = m_levelGoal.IsWinner();

          //wait one frame
          yield return(null);
      }
  }
Ejemplo n.º 6
0
    // coroutine for game play
    IEnumerator PlayGameRoutine()
    {
        // if level is timed, start the timer
        if (m_levelGoal.levelCounter == LevelCounter.Timer)
        {
            m_levelGoal.StartCountdown();
        }
        // while the end game condition is not true, we keep playing
        // just keep waiting one frame and checking for game conditions
        while (!m_isGameOver)
        {
            m_isGameOver = m_levelGoal.IsGameOver();

            m_isWinner = m_levelGoal.IsWinner();

            // wait one frame
            yield return(null);
        }
    }
Ejemplo n.º 7
0
    IEnumerator PlayGameRoutine()
    {
        if (IsTimedLevel())
        {
            levelGoal.StartCountdown();
        }

        while (!isGameOver)
        {
            if (isPaused)
            {
                yield return(StartCoroutine(SettingsMenuRoutine()));
            }
            isGameOver = levelGoal.IsGameOver();
            isWinner   = levelGoal.IsWinner();

            yield return(null);
        }
    }
Ejemplo n.º 8
0
    IEnumerator PlayGameRoutine()
    {
        if (m_levelGoal.levelCounter == LevelCounter.Timer)
        {
            m_levelGoal.StartCountdown();
        }

        while (!m_isGameOver)
        {
            m_isGameOver = m_levelGoal.IsGameOver();

            yield return(null);
        }

        if (m_levelGoal.levelCounter == LevelCounter.Timer)
        {
            m_levelGoal.StopCountdown();
        }

        yield return(StartCoroutine(WaitForBoardRoutine(0.5f)));

        m_isWinner = m_levelGoal.IsWinner();
    }