Пример #1
0
 public void LeaveGame()
 {
     if (GUI.Button(new Rect(750, 20, 80, 20), "leave game"))
     {
         if ((System.Object)MyLobby.singleton != (System.Object)null)
         {
             manager.SetupMigrationManager((Host)null);
             manager.StopHost();
         }
         this.Reset(-1);
     }
 }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        MyLobby lobby = GameObject.Find("LobbyMgr").GetComponent <MyLobby>();

        lobby.GuiOnPlayScene(false);
        GameObject.Find("LoadingText").GetComponent <WaitingForOpponent>().StopWaiting();

        lobby.DestroyMatch();
        Debug.Log("@@StopClient");
        if (lobby.matchInfo != null)
        {
            Debug.Log("$$StopHost sceneHandler");
            lobby.StopHost();
        }
        Debug.Log("@@StopMM");
        lobby.StopMatchMaker();
    }