public void OpponentSearching() { opponentSearching = true; readyToggle.Hide(); readyToggle.gameObject.SetActive(false); readyButtonContextText.text = ""; if (readyFader.visible) { readyFader.FadeOut(); } ResetToSearchingPanel(); Debug.Log("Opponent Searching..."); }
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); } }
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(); } } }