public Nullable <Rectangle> GetRectIfPlayerIsBlocked(BoundingArea boundingArea) { Rectangle limitRect = _tileArray[0, 0].GetBoundingArea().GetRect(); limitRect.Width = _width * _tileWidth; limitRect.Height = _height * _tileHeight; if (!limitRect.Contains(boundingArea.GetRect())) { return(limitRect); } return(getIntersectingRectangle(boundingArea)); }
public bool Contains(BoundingArea boundingArea) { return(GetRect().Contains(boundingArea.GetRect())); }
public bool Intersects(BoundingArea boundingArea) { return(GetRect().Intersects(boundingArea.GetRect())); }