Engine.Objects.HWSurfaceInstance.Line C# (CSharp) Méthode

Line() private méthode

private Line ( int x1, int y1, int x2, int y2, ColorInstance color ) : void
x1 int
y1 int
x2 int
y2 int
color ColorInstance
Résultat void
        public void Line(int x1, int y1, int x2, int y2, ColorInstance color)
        {
            Color col = color.GetColor();
            Vertex[] _verts = new Vertex[2];
            _verts[0] = new Vertex(new Vector2f(x1, y1), col);
            _verts[1] = new Vertex(new Vector2f(x2, y2), col);
            _myBatch.AddVerts(_verts, 2, PrimitiveType.Lines);
            _changed = true;
        }