State.cs 902 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Microsoft.Xna.Framework;
  2. using Microsoft.Xna.Framework.Content;
  3. using Microsoft.Xna.Framework.Graphics;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace Tutorial013.States
  10. {
  11. public abstract class State
  12. {
  13. #region Fields
  14. protected ContentManager _content;
  15. protected GraphicsDevice _graphicsDevice;
  16. protected Game1 _game;
  17. #endregion
  18. #region Methods
  19. public abstract void Draw(GameTime gameTime, SpriteBatch spriteBatch);
  20. public abstract void PostUpdate(GameTime gameTime);
  21. public State(Game1 game, GraphicsDevice graphicsDevice, ContentManager content)
  22. {
  23. _game = game;
  24. _graphicsDevice = graphicsDevice;
  25. _content = content;
  26. }
  27. public abstract void Update(GameTime gameTime);
  28. #endregion
  29. }
  30. }