Exemple #1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(
                direction == Direction.Right ? graphics.PlayerRight : graphics.PlayerLeft,
                screenSpace.Position((int)position.X, (int)position.Y),
                Color.White
                );

            //var collisionChecks =
            //   level.CheckCollision(ProjectedBounds);

            //spriteBatch.DrawString(
            //      font,
            //      $"{velocity.X}, {velocity.Y}",
            //      new Vector2(600, 0),
            //      Color.White
            //   );
            //spriteBatch.DrawString(
            //   font,
            //   $"{collisionChecks.Left}, " +
            //   $"{collisionChecks.Right}, " +
            //   $"{collisionChecks.Top}, " +
            //   $"{collisionChecks.Bottom}",
            //   Vector2.Zero,
            //   Color.White
            //);
        }
Exemple #2
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(
         texture,
         gameArea.Position(
             (int)position.X,
             (int)position.Y
             ),
         Color.White
         );
 }