public static void DrawNodeGrid(Rect position, float snapInt, Color color, float alpha = 0.3f, float width = 1)
        {
            color.a = alpha;
            //vertical lines
            for (float x = snapInt; x < position.width; x += snapInt)
            {
                RPGAIODrawing.DrawLine(new Vector2(x, position.y), new Vector2(x, position.height - 15), color, width, false);
            }

            //horizontal lines
            for (float y = position.y; y <= position.height; y += snapInt)
            {
                RPGAIODrawing.DrawLine(new Vector2(0, y), new Vector2((position.width * 2) - 30, y), color, width, false);
            }
        }
Ejemplo n.º 2
0
    public static void BezierLine(Vector2 start, Vector2 startTangent, Vector2 end, Vector2 endTangent, Color color, float width, bool antiAlias, int segments)
    {
        Vector2 lastV = cubeBezier(start, startTangent, end, endTangent, 0);



        for (int i = 1; i <= segments; ++i)
        {
            Vector2 v = cubeBezier(start, startTangent, end, endTangent, i / (float)segments);



            RPGAIODrawing.DrawLine(lastV, v, color, width, antiAlias);



            lastV = v;
        }
    }