private void ExitPrevious()
    {
        switch (gameState)
        {
        case GameState.SelectServerMenu:
            selectServerMenu.Exit();
            break;

        case GameState.CustomServerMenu:
            customServerMenu.Exit();
            break;

        case GameState.CreditsScreen:
            creditsScreen.Exit();
            break;

        case GameState.VersionScreen:
            versionScreen.Exit();
            break;

        case GameState.MainMenu:
            mainMenu.Exit();
            break;

        case GameState.ReconnectionMenu:
            reconnectionMenu.Exit();
            break;

        case GameState.EnteringMatchScreen:
            enteringMatchScreen.Exit();
            break;

        case GameState.EnterUsername:
            enterUsername.Exit();
            break;

        case GameState.SelectPlayersMenu:
            selectPlayersMenu.Exit();
            break;

        case GameState.SelectGameModeMenu:
            selectGameModeMenu.Exit();
            break;

        case GameState.EnteringQueueScreen:
            enteringQueueScreen.Exit();
            break;

        case GameState.QueueMenu:
            queueMenu.Exit();
            break;

        case GameState.EnterRoomMenu:
            enterRoomMenu.Exit();
            break;

        case GameState.CreatingRoomScreen:
            creatingRoomScreen.Exit();
            break;

        case GameState.EnteringRoomScreen:
            enteringRoomScreen.Exit();
            break;

        case GameState.RoomMenu:
            roomMenu.Exit();
            break;

        case GameState.ClientTokenScreen:
            clientTokenScreen.Exit();
            break;

        case GameState.LostConnectionScreen:
            lostConnectionScreen.Exit();
            break;

        case GameState.InGame:
            inGame.Exit();
            menuMusic.Play();
            break;
        }
    }