Player.cs 515 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.Xna.Framework;
  7. using Microsoft.Xna.Framework.Graphics;
  8. using Microsoft.Xna.Framework.Input;
  9. namespace Tutorial029.Sprites
  10. {
  11. public class Player : Sprite
  12. {
  13. public Vector2 Velocity;
  14. public Player(Texture2D texture)
  15. : base(texture)
  16. {
  17. }
  18. public override void Update(GameTime gameTime)
  19. {
  20. Velocity.X = 3f;
  21. }
  22. }
  23. }