public void SetGameState(GameState newGameState, bool transition = true) { if (uIManager.isTransitioning && transition) { return; } switch (newGameState) { case GameState.Gameplay: tileBoard.ClearGrid(); tileBoard.GenerateGrid(); timeRemaining = 100; maxTime = 100; score = 0; break; case GameState.Opening: tileBoard.ClearGrid(); effects.ClearTileHighlights(); effects.ClearLines(); break; } uIManager.SetUIScreen(newGameState, transition); currentGameState = newGameState; }