static void DrawPath2D(VectorPath2D path, GizmoType gizmoType) { BrushSettingsWindow.Initialize(); var lineColor = ColorPalletReader.GetLineColor(ColorStates.SELECTED); if (gizmoType == GizmoType.NotSelected) { lineColor = ColorPalletReader.GetLineColor(ColorStates.PATH); } drawPath(path, lineColor); }
static void DrawPolgonColliders2D(PolygonCollider2D polygon, GizmoType gizmoType) { BrushSettingsWindow.Initialize(); var lineColor = ColorPalletReader.GetLineColor(ColorStates.SELECTED); if (gizmoType == GizmoType.NotSelected) { ColorStates state = ColorStates.IDLE; if (_assignedColors.TryGetValue(polygon, out state)) { lineColor = ColorPalletReader.GetLineColor(state); } else { state = Utilities.DetermineColorState(polygon); lineColor = ColorPalletReader.GetLineColor(state); _assignedColors.Add(polygon, state); // Cache it because GetComponent is slow. } } drawPolygon(polygon, lineColor); }
static void DrawCircleColliders2D(CircleCollider2D circle, GizmoType gizmoType) { BrushSettingsWindow.Initialize(); drawCircle(circle); }
static void DrawRectangleColliders2D(BoxCollider2D box, GizmoType gizmoType) { BrushSettingsWindow.Initialize(); drawRectangle(box); }