public override void Draw(IDrawTarget drawTarget, Rectangle drawRect)
 {
     drawTarget.Clear(this.backgroundColor);
     for (int i = 0; i < this.spritePositions.Length; i++)
     {
         drawTarget.DrawBitmap(this.testSprite, this.spritePositions[i].X, this.spritePositions[i].Y);
     }
 }
Exemple #2
0
 /// <summary>
 /// Draws this player to it's current position.
 /// </summary>
 /// <param name="drawTarget">The draw target in which to draw.</param>
 /// <param name="drawRect">The bounding rectangle in the draw target.</param>
 public void Draw(IDrawTarget drawTarget, Rectangle drawRect)
 {
     if (this.isActive)
     {
         /// Draw only if this is an active player.
         drawTarget.DrawBitmap(this.simulator.GetPlayerBitmap(this.currentColor),
                               this.currentPosition.X,
                               this.currentPosition.Y);
     }
     this.previousPosition = this.currentPosition;
     this.isDirty          = false;
 }