示例#1
0
 public override void OnLobbyEntered(GalaxyID lobbyID, LobbyEnterResult _result)
 {
     if (_result != LobbyEnterResult.LOBBY_ENTER_RESULT_SUCCESS)
     {
         Debug.Log("LobbyEnteredListenerBrowsing failed");
         GameObject.Find("MainMenu").GetComponent <MainMenuController>().SwitchMenu(MainMenuController.MenuEnum.OnlineBrowser);
         GameObject.Find("PopUps").GetComponent <PopUps>().PopUpWithClosePopUpsButton("Could not join lobby\nReason: " +
                                                                                      _result.ToString(), "Back");
         return;
     }
     Debug.Log("LobbyEnteredListenerBrowsing succeded");
     matchmaking.CurrentLobbyID = lobbyID;
     matchmaking.LobbyOwnerID   = matchmaking.GetLobbyOwner(lobbyID);
     matchmaking.SetLobbyMemberData("state", "notReady");
     GameObject.Find("MainMenu").GetComponent <MainMenuController>().SwitchMenu(MainMenuController.MenuEnum.OnlineWait);
     friends.SetRichPresence("status", "In online lobby");
     friends.SetRichPresence("connect", "--JoinLobby=" + lobbyID);
     matchmaking.LobbyManagmentMainMenuListenersInit();
     matchmaking.LobbyChatListenersInit();
     matchmaking.LobbyBrowsingListenersDispose();
 }