private void OnGameStateChange(GameStates state) { if (state.Equals(GameStates.Playing)) { _isGameStarted = true; } }
private void OnGameStateChanged(GameStates state) { if (!state.Equals(GameStates.Playing)) { return; } infoText.gameObject.SetActive(false); PrepareNewPiece(); _pieceController.SetPieceStateActive(); }
public void PauseUnpauseGame() { //Time.timeScale = 1.0f - Time.timeScale; if (m_currentGameState.Equals(GameStates.RUNNING)) { EnterState(GameStates.PAUSED); } else { EnterState(GameStates.RUNNING); } }
public static void toggleSpectate() { if (gameState.Equals(GameStates.Play)) { gameState = GameStates.Spectate; instructionsText.SetActive(true); } else { gameState = GameStates.Play; instructionsText.SetActive(false); } }
/** * Whether or not the game is paused. */ public bool IsPaused() { return(m_currentGameState.Equals(GameStates.PAUSED) || m_currentGameState.Equals(GameStates.WON_PAUSED)); }