예제 #1
0
 private void RefreshBallPosition(int rowIndex, int colIndex, Ball ball)
 {
     if (rowIndex % 2 == 0)
     {
         ball.Position = Position + new Vector3(rowIndex * 2 * Ball.BALL_RADIUS, colIndex * 2 * Ball.BALL_RADIUS, 0);
     }
     else
     {
         ball.Position = Position + new Vector3(rowIndex * 2 * Ball.BALL_RADIUS, colIndex * 2 * Ball.BALL_RADIUS + ODD_ROW_OFFSET, 0); ;
     }
     ball.Normalize();
 }