Line.Line C# (CSharp) Method

Line() public method

public Line ( int graphWidth, float graphHeight, PanelInfos, panelInfos ) : System.Collections
graphWidth int
graphHeight float
panelInfos PanelInfos,
return System.Collections
    public Line(int graphWidth, float graphHeight, PanelInfos panelInfos)
    {
        this._panelInfos = panelInfos;
        this._graphWidth = graphWidth;
        this.graphHeight = graphHeight;

        this._pointsList = new List<float>();
        this._pointsArray = new Vector3[_graphWidth];

        this.color = new Color(Random.Range(0.2f, 1f), Random.Range(0.2f, 1f), Random.Range(0.2f, 1f));

        this._vectorline = new VectorLine("Graph", _pointsArray, this.color, null, 1.0f, LineType.Continuous, Joins.Weld);
        this._vectorline.layer = _panelInfos.layer;

        for(int i = 0; i < _graphWidth; i++)
            _pointsList.Add(0);

        resize();
        redraw();
    }