示例#1
0
        private void DrawPlayerLines()
        {
            if (_playerLines == null)
            {
                CalculatePlayerLines();
                return;
            }
            //TODO: Refactor
            LineDrawer.BlurThreshold = LineDrawer.ComputeBlurThreshold(1.0f, LineDrawer.ViewProjMatrix, 800);
            bool loopedOnce = false;

            for (int x = _topLine; (x != _topLine) || (!loopedOnce); x = (x + 1) % 4)
            {
                loopedOnce = true;
                var limit  = (int)Math.Min(_lineData[x].Length, _drawProgress);
                var colour = (x == CPUPlayerID && LegendStyle == LegendStyle.Normal) ? LineColours[4] : LineColours[x];
                LineDrawer.Draw(_playerLines[x].Take(limit), 1.5f, colour, 0, null);
            }
        }
示例#2
0
        private void DrawLineLevels()
        {
            float posX = 0;

            _lineList.Clear();
            for (int x = 0; x < _lineLevels.Count(); x++)
            {
                var p0 = new Vector2(posX + 1, this.Height * _lineLevels[x]);
                var p1 = new Vector2(posX + this.Width - 1, this.Height * _lineLevels[x]);
                p0 += this.Position;
                p1 += this.Position;
                _lineList.Add(new RoundLine(p0, p1));
                posX += this.Width;
            }

            _line.Draw(_lineList, 1, ColorShading, 0, null);
        }
示例#3
0
        public void Draw(float[] levels)
        {
            if (levels.Length < 2)
            {
                return;
            }
            _lineList.Clear();
            var   step = 1.0f * this.Width / (levels.Length - 1);
            float posX = 0;


            for (int x = 1; x < levels.Count(); x++)
            {
                var p0 = new Vector2(posX, (this.Height * levels[x - 1]));
                var p1 = new Vector2(posX + step, (this.Height * levels[x]));
                p0 += this.Position;
                p1 += this.Position;

                _lineList.Add(new RoundLine(p0, p1));
                posX += step;
            }

            _roundLine.Draw(_lineList, 2, ColorShading, 0, null);
        }
示例#4
0
 private void FinishBatch()
 {
     rlm.Draw(instanceData, instanceCount);
     instanceCount = 0;
 }