Example #1
0
 bool ISolid.CollidesWith(Rectangle bbox)
 {
     if (bbox.Intersects(BoundingBox))
     {
         Vector2 bottomRight = new Vector2(bbox.Right, bbox.Bottom);
         if (bottomRight.DistanceToLine(new Vector2(BoundingBox.Left, BoundingBox.Bottom), new Vector2(BoundingBox.Right, BoundingBox.Top)) <= 0)
             return true;
     }
     return false;
 }