Exemplo n.º 1
0
 public void intersect(Ball ball, Boxes box)
 {
     if (ball.box.rect.IntersectsWith(box.rect))
     {
         BallSpeed(ball);
     }
 }
Exemplo n.º 2
0
 public void intersect(Ball ball, Boxes box)
 {
     if (ball.box.rect.IntersectsWith(box.rect))
     {
         if ((ball.Speed.X) * 2 <= 10 && (ball.Speed.Y) * 2 <= 10)
         {
             BallSpeed(ball);
         }
     }
 }
Exemplo n.º 3
0
 public Ball(Point position, int radius)
 {
     this.position = position;
     this.radius   = radius;
     box           = new Boxes(new Point(position.X - radius, position.Y - radius), new Size(radius * 2, radius * 2), Color.Transparent);
 }