Esempio n. 1
0
 private void Start()
 {
     networkManager = MyLobby.s_Singleton;
     if (networkManager.matchMaker == null)
     {
         networkManager.StartMatchMaker();
     }
     RefreshRoomList();
 }
Esempio n. 2
0
 private void Awake()
 {
     if (s_Singleton == null)
     {
         s_Singleton = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 3
0
 public void Disconnect()
 {
     Prototype.MyNetworkLobby.MyLobby netManager = NetworkManager.singleton as Prototype.MyNetworkLobby.MyLobby;
     if (isServer)
     {
         netManager.StopHost();
         Destroy(NetworkManager.singleton.gameObject);
     }
     else
     {
         NetworkClient.ShutdownAll();
         netManager.StopClient();
         Destroy(gameObject);
     }
 }