Ejemplo n.º 1
0
    public void OpponentSearching()
    {
        opponentSearching = true;
        readyToggle.Hide();
        readyToggle.gameObject.SetActive(false);
        readyButtonContextText.text = "";

        if (readyFader.visible)
        {
            readyFader.FadeOut();
        }

        ResetToSearchingPanel();

        Debug.Log("Opponent Searching...");
    }
Ejemplo n.º 2
0
    public void DisconnectRecieved()
    {
        if (teamChangePanel != null && teamChangePanel.isOpen)
        {
            teamChangePanel.Close();
        }

        opponentSearching = true;

        readyButtonContextText.text = "";
        ResetToSearchingPanel();

        if (lobbyType == Type.Host)
        {
            startButton.HideButton();
        }
        else if (lobbyType == Type.Client)
        {
            readyToggle?.Hide();
            readyToggle?.gameObject.SetActive(false);
        }
    }
Ejemplo n.º 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (client != null)
     {
         client.sendMessage("r+true");
         if (client.ready)
         {
             Form opponentForm = new OpponentForm(client, this);
             opponentForm.Show();
             setup = false;
             ReadyButton.Hide();
             button_Reset.Hide();
             waitingLabel.Hide();
         }
         else
         {
             waitingLabel.Show();
         }
     }
     else if (server != null)
     {
         if (server.ready)
         {
             server.sendMessage("r+true");
             Form opponentForm = new OpponentForm(server, this);
             opponentForm.Show();
             setup = false;
             ReadyButton.Hide();
             button_Reset.Hide();
             waitingLabel.Hide();
         }
         else
         {
             waitingLabel.Show();
         }
     }
 }