예제 #1
0
    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);
    }
예제 #2
0
    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);
    }
예제 #3
0
 static void DrawCircleColliders2D(CircleCollider2D circle, GizmoType gizmoType)
 {
     BrushSettingsWindow.Initialize();
     drawCircle(circle);
 }
예제 #4
0
    static void DrawRectangleColliders2D(BoxCollider2D box, GizmoType gizmoType)
    {
        BrushSettingsWindow.Initialize();

        drawRectangle(box);
    }