I'm creating a background out of the Xna game studio 3.0 book for xna 4.0 and I'm trying to create a background using the code given in the book.
I get some errors half way through and I don't know why. Can I please get some help of why this is happening?
By the way this is my first time on this site so sorry if I'm doing something wrong.
my code : ** code ** = error
#region Background code and data
**GameSpriteStruct** background;
private void loadBackgroundContent()
{
background.SpriteTexture =
Content.Load<Texture2D>("Clear");
background.SpriteRectangle =
new Rectangle(
(int)**minDisplayX**, (int)**minDisplayY**,
(int)(**maxDisplayX** - **minDisplayX**),
(int)(**maxDisplayY** - **minDisplayY**)
);
}
private void updateBackground()
{
}
private void drawBackground()
{
spriteBatch.Draw(background.SpriteTexture,
background.SpriteRectangle, Color.White);
}