Ejemplo n.º 1
0
 public void ConnectAction()
 {
     if (connectButton.GetCurrentAnimatorStateInfo(0).IsName("ReadyState"))
     {
         connectButton.SetTrigger("Connecting");
         wantsSpawn = true;
     }
     else if (connectButton.GetCurrentAnimatorStateInfo(0).IsName("FailedToSpawn"))
     {
         connectButton.SetTrigger("Retry");
         wantsSpawn = true;
     }
     else if (connectButton.GetCurrentAnimatorStateInfo(0).IsName("FailedToConnect") ||
              connectButton.GetCurrentAnimatorStateInfo(0).IsName("WorkerDisconnected"))
     {
         connectButton.SetTrigger("Retry");
         ClientWorkerHandler.CreateClient();
     }
 }
 private void Start()
 {
     Instance = this;
     CreateClientWorker();
 }
 private void Awake()
 {
     Instance = this;
 }