public void NewRound() { if (isMaster) { masterPaddle.ResetPostition(); } else { slavePaddle.ResetPostition(); } }
public IEnumerator GameOver(string goalName) { int playerNumber; if (goalName == "GoalR") { scores[0]++; playerNumber = 1; } else { scores[1]++; playerNumber = 2; } UIController.Instance.UpdatedScores(scores, playerNumber); yield return(new WaitForSeconds(1f)); UIController.Instance.TurnGameOverPopup(); ball.ResetPostition(); paddleL.ResetPostition(); paddleR.ResetPostition(); }