Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
 internal abstract bool Overlaps(OverlapShape otherShape);
Пример #4
0
 public void Remove(OverlapShape shape)
 {
     _shapes.Remove(shape);
 }
Пример #5
0
 public void Add(OverlapShape shape)
 {
     _shapes.Add(shape);
 }