void ChangeState(GameState nextState) { switch (currentGameState) { case GameState.PLAYING: break; case GameState.PAUSE: myUIManager.ShowPauseCanvas(false); break; case GameState.QUIT: break; case GameState.VICTORY: myUIManager.ShowVictoryCanvas(false); myPanelManager.ClearAllNumbers(); break; } switch (nextState) { case GameState.PLAYING: break; case GameState.PAUSE: myUIManager.ShowPauseCanvas(true); break; case GameState.QUIT: break; case GameState.VICTORY: myUIManager.ShowVictoryCanvas(true); myUIManager.SetRecords(); break; } currentGameState = nextState; }