private void OnGameStateChange(GameStates state)
 {
     if (state.Equals(GameStates.Playing))
     {
         _isGameStarted = true;
     }
 }
Beispiel #2
0
    private void OnGameStateChanged(GameStates state)
    {
        if (!state.Equals(GameStates.Playing))
        {
            return;
        }

        infoText.gameObject.SetActive(false);
        PrepareNewPiece();
        _pieceController.SetPieceStateActive();
    }
Beispiel #3
0
 public void PauseUnpauseGame()
 {
     //Time.timeScale = 1.0f - Time.timeScale;
     if (m_currentGameState.Equals(GameStates.RUNNING))
     {
         EnterState(GameStates.PAUSED);
     }
     else
     {
         EnterState(GameStates.RUNNING);
     }
 }
Beispiel #4
0
 public static void toggleSpectate()
 {
     if (gameState.Equals(GameStates.Play))
     {
         gameState = GameStates.Spectate;
         instructionsText.SetActive(true);
     }
     else
     {
         gameState = GameStates.Play;
         instructionsText.SetActive(false);
     }
 }
Beispiel #5
0
 /**
  * Whether or not the game is paused.
  */
 public bool IsPaused()
 {
     return(m_currentGameState.Equals(GameStates.PAUSED) ||
            m_currentGameState.Equals(GameStates.WON_PAUSED));
 }