Example #1
0
 public static bool CollidesWith(this Vector2 v, BoundingRectangle r)
 {
     return((r.X <= v.X && v.X <= r.X + r.Width) &&
            (r.Y <= v.Y && v.Y <= r.Y + r.Height));
 }
Example #2
0
 public static bool CollidesWith(this BoundingRectangle r, Vector2 v)
 {
     return(v.CollidesWith(r));
 }
Example #3
0
 public static bool CollidesWith(this BoundingRectangle r, BoundingCircle c)
 {
     return(c.CollidesWith(r));
 }