public bool insideOf(Rect r) { // is this rect completely inside of rect r? if (r.PointInRect(this.p) && r.PointInRect(this.BottomRight())) { return(true); } else { return(false); } }
private bool TestPointForTunnel(Mazes.Point p) { // check that the point is within the selected area, and is active (has a tile on it) Mazes.Rect r = new Mazes.Rect(x, y, x2 - (this.totalWidth * 2), y2 - (this.totalWidth * 2)); return (r.PointInRect(p) && Main.tile[p.X, p.Y].active()); }
private bool TestPointForTunnel(Mazes.Point p) { // check that the point is within the selected area, and is active (has a tile on it) Mazes.Rect r = new Mazes.Rect(x, y, x2 - (this.totalWidth * 2), y2 - (this.totalWidth * 2)); return(r.PointInRect(p) && Main.tile[p.X, p.Y].active); }