Ejemplo n.º 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);
    }
Ejemplo n.º 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);
    }
Ejemplo n.º 3
0
 static void DrawCircleColliders2D(CircleCollider2D circle, GizmoType gizmoType)
 {
     BrushSettingsWindow.Initialize();
     drawCircle(circle);
 }
Ejemplo n.º 4
0
    static void DrawRectangleColliders2D(BoxCollider2D box, GizmoType gizmoType)
    {
        BrushSettingsWindow.Initialize();

        drawRectangle(box);
    }