public static void DrawSolidRect(IsoRect rect, Color face_color, Color outline_color)
 {
     Handles.DrawSolidRectangleWithOutline(
         new Rect(rect.x.min, rect.y.min, rect.size.x, rect.size.y),
         face_color,
         outline_color);
 }
예제 #2
0
 public void LookUp(IsoRect bounds)
 {
             #if UNITY_EDITOR
     IsoUtils.DrawSolidRect(
         bounds,
         IsoUtils.ColorChangeA(Color.red, 0.05f),
         Color.red);
             #endif
 }
        public static void DrawRect(IsoRect rect, Color color)
        {
            Handles.color = color;
            var point0 = new Vector2(rect.x.min, rect.y.min);
            var point1 = new Vector2(rect.x.max, rect.y.min);
            var point2 = new Vector2(rect.x.max, rect.y.max);
            var point3 = new Vector2(rect.x.min, rect.y.max);

            Handles.DrawLine(point0, point1);
            Handles.DrawLine(point1, point2);
            Handles.DrawLine(point2, point3);
            Handles.DrawLine(point3, point0);
        }
예제 #4
0
 public bool Contains(IsoRect other)
 {
     return
         (x.Contains(other.x) &&
          y.Contains(other.y));
 }
예제 #5
0
 public void Set(IsoRect other)
 {
     x.Set(other.x);
     y.Set(other.y);
 }
예제 #6
0
 public IsoRect(IsoRect other) : this()
 {
     x.Set(other.x);
     y.Set(other.y);
 }
예제 #7
0
 public static IsoRect Merge(IsoRect a, IsoRect b)
 {
     a.x = IsoMinMax.Merge(a.x, b.x);
     a.y = IsoMinMax.Merge(a.y, b.y);
     return(a);
 }
예제 #8
0
 public bool Approximately(IsoRect other)
 {
     return
         (x.Approximately(other.x) &&
          y.Approximately(other.y));
 }
예제 #9
0
 public bool Overlaps(IsoRect other)
 {
     return
         (x.Overlaps(other.x) &&
          y.Overlaps(other.y));
 }