internal override bool Overlaps(OverlapShape otherShape) { if (otherShape is OverlapBox b) { return(Polygon2.Intersects(b.Poly, Poly, b.Pos, Pos, b.Rot, Rot, false)); } return(false); }
public bool CanAdd(OverlapShape shape) { foreach (var otherShape in _shapes) { if (shape.Overlaps(otherShape)) { return(false); } } //if (shape.Outside(_sizeX, _sizeY)) // return false; return(true); }
internal abstract bool Overlaps(OverlapShape otherShape);
public void Remove(OverlapShape shape) { _shapes.Remove(shape); }
public void Add(OverlapShape shape) { _shapes.Add(shape); }