コード例 #1
0
 /// <summary>
 /// checks if a player has scored, if so, resets ball's position
 /// </summary>
 public void CheckScoreConditions()
 {
     if (ball.CollisionLeft == true)
     {
         scoreRight.UpdateScore();
         ball.BallPosition  = ballStartPosition;
         ball.CollisionLeft = false;
         winConditions      = scoreRight.WinConditions;
     }
     else if (ball.CollisionRight == true)
     {
         scoreLeft.UpdateScore();
         ball.BallPosition   = ballStartPosition;
         ball.CollisionRight = false;
         winConditions       = scoreLeft.WinConditions;
     }
 }