public void Back()
        {
            switch (currentMenu)
            {
            case MultiplayerMenu.main:     //if we're in the main multiplayer menu
                LoadMainMenu();
                break;

            case MultiplayerMenu.loading:                                //if we're in the loading menu then connection to a lobby was in progress
                manager.LastDisconnectionType = DisconnectionType.abort; //player aborts connetion
                manager.LeaveLobby();                                    //leave the lobby
                break;

            case MultiplayerMenu.lobby:                                 //and if we were in a game lobby
                manager.LastDisconnectionType = DisconnectionType.left; //player leaves lobby
                manager.LeaveLobby();                                   //leave the lobby
                break;
            }
        }
        public void RpcKickPlayer(bool falseGameVersion)
        {
            if (isLocalPlayer == false) //if this is not the local player then do not proceed
            {
                return;
            }

            manager.LastDisconnectionType = (falseGameVersion == true) ? DisconnectionType.gameVersion : DisconnectionType.kick; //get the disconnection reason
            manager.LeaveLobby();                                                                                                //make the local player leave the lobby
        }