private void Rpc_updateClientValue(int value, int playerIndex)
{
scoreSystem[playerIndex].playerScore = value;
// if(scoreSystem[playerIndex].playerScore >= 80)
// {
// gameEndText.text = "Player: " + (playerIndex + 1) + " has won the game";
// }
for (int i = 0; i < scoreSystem.Length; i++)
{
if (scoreSystem[i].player == null)
{
break;
}
if (scoreSystem[i].playerTxt[playerIndex] != null)
{
scoreSystem[i].playerTxt[playerIndex].text = "Player " + (playerIndex + 1) + " " + scoreSystem[playerIndex].playerScore;
}
else
{
break;
}
}
}