Пример #1
0
 public static bool CollidesWith(this BoundingRectangle r, BoundingCircle c)
 {
     return(c.CollidesWith(r));
 }
Пример #2
0
 public static bool CollidesWith(this BoundingRectangle a, BoundingRectangle b)
 {
     return(!(a.X > b.X + b.Width || a.X + a.Width < b.X || a.Y > b.Y + b.Height || a.Y + a.Height < b.Y));
 }