I need beginner help on loading an image (2D). I have an error
Posted
by
Seth Taddiken
on Game Development
See other posts from Game Development
or by Seth Taddiken
Published on 2012-10-29T03:15:10Z
Indexed on
2012/10/29
5:22 UTC
Read the original article
Hit count: 230
I keep getting a "NullReferenceExeption was unhandled" with "Object reference not set to an instance of an object." written under it. I have all of the images (png) correct with names and added to references.
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
backGround = Content.Load("Cracked");
player1.playerBlock = Content.Load("square");
player2.playerBlock = Content.Load("square2"); }
© Game Development or respective owner