Exemplo n.º 1
0
    private static void drawCircle(CircleCollider2D circle)
    {
        var         lineColor = ColorPalletReader.GetLineColor(ColorStates.IDLE);
        ColorStates state     = ColorStates.IDLE;

        if (_assignedColors.TryGetValue(circle, out state))
        {
            lineColor = ColorPalletReader.GetLineColor(state);
        }
        else
        {
            state     = Utilities.DetermineColorState(circle);
            lineColor = ColorPalletReader.GetLineColor(state);
            _assignedColors.Add(circle, state);
        }

        if (circle.gameObject == Selection.activeGameObject && _isAdjusting)
        {
            lineColor = ColorPalletReader.GetLineColor(ColorStates.SELECTED);
        }

        Gizmos.color = lineColor;
        Gizmos.DrawWireSphere(circle.GetWorldCenter(), circle.radius);
    }