Exemple #1
0
 public void DrawAll(Point[] clear, Point[] next, Point[] figure, Score score)
 {
     if (clear != null)
     {
         DrawNextFigure(clear, (uint) BlockType.Empty);
     }
     DrawNextFigure(next, (uint) BlockType.Alive);
     DrawField();
     DrawFigure(figure, (uint) BlockType.Alive);
     DrawScore(score);
 }
Exemple #2
0
 public void ComputeScore(double nextBeat, double currentDelta)
 {
     var dfuture = (float) (Math.Abs(nextBeat - currentDelta));
     if (currentDelta > dfuture)
     {
         Score = new Score(Math.Abs(dfuture), false);
     }
     else
     {
         Score = new Score(Math.Abs(currentDelta), true);
     }
 }
Exemple #3
0
 public void DrawScore(Score score)
 {
     Lock();
     for (var i = 14; i < 19; i++)
     {
         Draw(i, 7, (uint) BlockType.Empty);
     }
     Unlock();
     _fontrenderer.DrawText(_spriteBatch, (_parent.Width + 1)*Blockwidth, 7*Blockheight, score.Points + " ms",
         score.Late ? Color.Blue : Color.Red);
 }