public void EndGame(bool Player1) { Time.timeScale = 0f; if (Player1) { Player1Wins.SetActive(true); } else { Player2Wins.SetActive(true); } }
protected void updateResultCounts(string result, string winner) { if (result.Length >= 3 && result.Substring(0, 3) == "1/2") { Player1Wins += 0.5; Player2Wins += 0.5; } else { if (Player1Name == winner) { Player1Wins++; } else if (Player2Name == winner) { Player2Wins++; } else { if (result.Length >= 3 && result.Substring(0, 3) == "1-0" && Player1Name == null) { Player1Name = winner; lblPlayer1Name.Text = Player1Name + ": "; Player1Wins++; lblPlayer1Name.Visible = true; lblPlayer1WinCount.Visible = true; } else if (result.Length >= 3 && result.Substring(0, 3) == "0-1" && Player2Name == null) { Player2Name = winner; lblPlayer2Name.Text = Player2Name + ": "; Player2Wins++; lblPlayer2Name.Visible = true; lblPlayer2WinCount.Visible = true; } } lblPlayer1WinCount.Text = Player1Wins.ToString(); lblPlayer2WinCount.Text = Player2Wins.ToString(); } }