コード例 #1
0
    private void Start()
    {
        VectorLine vectorLine = new VectorLine("Line", new List <Vector2>(this.segments + 1), this.lineTexture, 3f, (LineType)0);

        vectorLine.MakeEllipse(Vector2.op_Implicit(new Vector2((float)(Screen.get_width() / 2), (float)(Screen.get_height() / 2))), this.xRadius, this.yRadius, this.segments, this.pointRotation);
        vectorLine.Draw();
    }
コード例 #2
0
    // Token: 0x06000B11 RID: 2833 RVA: 0x0003197C File Offset: 0x0002FD7C
    private void Start()
    {
        List <Vector2> points     = new List <Vector2>(this.segments + 1);
        VectorLine     vectorLine = new VectorLine("Line", points, this.lineTexture, 3f, LineType.Continuous);

        vectorLine.MakeEllipse(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)), this.xRadius, this.yRadius, this.segments, this.pointRotation);
        vectorLine.Draw();
    }
コード例 #3
0
    // Token: 0x06000B13 RID: 2835 RVA: 0x00031A08 File Offset: 0x0002FE08
    private void Start()
    {
        List <Vector2> points     = new List <Vector2>(this.segments * 2 * this.numberOfEllipses);
        VectorLine     vectorLine = new VectorLine("Line", points, this.lineTexture, 3f);

        for (int i = 0; i < this.numberOfEllipses; i++)
        {
            Vector2 v = new Vector2((float)UnityEngine.Random.Range(0, Screen.width), (float)UnityEngine.Random.Range(0, Screen.height));
            vectorLine.MakeEllipse(v, (float)UnityEngine.Random.Range(10, Screen.width / 2), (float)UnityEngine.Random.Range(10, Screen.height / 2), this.segments, i * (this.segments * 2));
        }
        vectorLine.Draw();
    }
コード例 #4
0
    private void Start()
    {
        VectorLine vectorLine = new VectorLine("Line", new List <Vector2>(this.segments * 2 * this.numberOfEllipses), this.lineTexture, 3f);

        for (int index = 0; index < this.numberOfEllipses; ++index)
        {
            Vector2 vector2;
            ((Vector2) ref vector2).\u002Ector((float)Random.Range(0, Screen.get_width()), (float)Random.Range(0, Screen.get_height()));
            vectorLine.MakeEllipse(Vector2.op_Implicit(vector2), (float)Random.Range(10, Screen.get_width() / 2), (float)Random.Range(10, Screen.get_height() / 2), this.segments, index * (this.segments * 2));
        }
        vectorLine.Draw();
    }
コード例 #5
0
    void Start()
    {
        // Make Vector2 list where the size is the number of segments plus one (since the first and last points must be the same)
        var linePoints = new List <Vector2>(segments + 1);
        // Make a VectorLine object using the above points, with a width of 3 pixels
        var line = new VectorLine("Line", linePoints, lineTexture, 3.0f, LineType.Continuous);

        // Create an ellipse in the VectorLine object, where the origin is the center of the screen
        // If xRadius and yRadius are the same, you can use MakeCircleInLine instead, which needs just one radius value instead of two
        line.MakeEllipse(new Vector2(Screen.width / 2, Screen.height / 2), xRadius, yRadius, segments, pointRotation);
        // Draw the line
        line.Draw();
    }
コード例 #6
0
    void Start()
    {
        // Make Vector2 list where the size is twice the number of segments (since it's a discrete line where each segment needs two points),
        // multiplied by the total number to be drawn
        var linePoints = new List <Vector2>((segments * 2) * numberOfEllipses);
        // Make a VectorLine object using the above points, with a width of 3 pixels
        var line = new VectorLine("Line", linePoints, lineTexture, 3.0f);

        // Create the ellipses in the VectorLine object, where the origin is random, and the radii are random
        for (int i = 0; i < numberOfEllipses; i++)
        {
            var origin = new Vector2(Random.Range(0, Screen.width), Random.Range(0, Screen.height));
            line.MakeEllipse(origin, Random.Range(10, Screen.width / 2), Random.Range(10, Screen.height / 2), segments, i * (segments * 2));
        }
        // Draw the line
        line.Draw();
    }