Exemplo 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();
 }
Exemplo n.º 2
0
 void CleanUp()
 {
     StopHost();
     StopClient();
     NetworkServer.ClearLocalObjects();
     NetworkServer.ClearSpawners();
     NetworkServer.Reset();
 }
Exemplo 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();
    }
Exemplo 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();
 }