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); }
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); }
public bool Contains(IsoRect other) { return (x.Contains(other.x) && y.Contains(other.y)); }
public void Set(IsoRect other) { x.Set(other.x); y.Set(other.y); }
public IsoRect(IsoRect other) : this() { x.Set(other.x); y.Set(other.y); }
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); }
public bool Approximately(IsoRect other) { return (x.Approximately(other.x) && y.Approximately(other.y)); }
public bool Overlaps(IsoRect other) { return (x.Overlaps(other.x) && y.Overlaps(other.y)); }