Member variables
Just after the Game1
class declaration in the Game1.cs
file there are two class member declarations:
GraphicsDeviceManager graphics; SpriteBatch spriteBatch;
These two members will provide access to the system's video hardware (graphics
) and an instance of a class that can be used to draw 2D images and text (spriteBatch
). We can add our own member variables here for things we need to keep track of while our game is running.