Esempio n. 1
0
 public void StopHosting()
 {
     if (isServer)
     {
         StopHost();
         NetworkServer.ClearLocalObjects();
         NetworkServer.ClearSpawners();
     }
     if (isClient)
     {
         StopHost();
         StopClient();
     }
     if (MyNetDiscovery.running)
     {
         MyNetDiscovery.StopBroadcast();
     }
     StopAllCoroutines();
     NetworkServer.Reset();
     NetworkTransport.Init();
     NetworkTransport.Shutdown();
     isServer = false;
     isClient = false;
     TimeManager.Instance.gameObject.SetActive(false);
     UIManager.Instance.Connection();
 }
Esempio n. 2
0
 void CleanUp()
 {
     StopHost();
     StopClient();
     NetworkServer.ClearLocalObjects();
     NetworkServer.ClearSpawners();
     NetworkServer.Reset();
 }
Esempio n. 3
0
    private void Start()
    {
        Debug.Log("START PLANET");



        Textures = Resources.LoadAll("Textures", typeof(Texture2D));

        NetworkServer.ClearSpawners();

        foreach (var t in Textures)
        {
            Debug.Log(t.name);
        }
        CmdSpawnCards();
    }
Esempio n. 4
0
 public void StopHosting()
 {
     if (isServer)
     {
         StopHost();
         NetworkServer.ClearLocalObjects();
         NetworkServer.ClearSpawners();
     }
     if (isClient)
     {
         StopHost();
         StopClient();
     }
     StopAllCoroutines();
     NetworkServer.Reset();
     AutoConnectButton.GetComponentInChildren <Text>().text = TextManager.Instance.Search;
     EnableButtons();
     UIManager.Instance.ResetMenus();
 }