示例#1
0
        public LineHelper(Vector3 start, Vector3 end, short time, LineHelperManager lineHelperManager)
        {
            if (!GameSettings.d_drawlines)
            {
                return;
            }

            _start = start;
            _end   = end;

            Verts = new VertexPositionColor[2];
            //Verts[0].Position = _start;
            //Verts[1].Position = _end;

            //Verts[0].Color = new Color(Color.Red, 0.5f);
            //Verts[1].Color = new Color(Color.Green, 0.5f);
            Verts[0] = lineHelperManager.GetVertexPositionColor(_start, new Color(Color.Red, 0.5f));
            Verts[1] = lineHelperManager.GetVertexPositionColor(_end, new Color(Color.Green, 0.5f));
            Timer    = time;
        }
示例#2
0
        public LineHelper(Vector3 start, Vector3 end, short time, Color starColor, Color endColor, LineHelperManager lineHelperManager)
        {
            if (!GameSettings.d_drawlines)
            {
                return;
            }

            _start = start;
            _end   = end;

            Verts = new VertexPositionColor[2];
            //Verts[0].Position = _start;
            //Verts[1].Position = _end;

            //Verts[0].Color = starColor;
            //Verts[1].Color = endColor;
            Verts[0] = lineHelperManager.GetVertexPositionColor(_start, starColor);
            Verts[1] = lineHelperManager.GetVertexPositionColor(_end, endColor);

            Timer = time;
        }