fix: Sprite Batch Exception at Runtime
This commit is contained in:
parent
8ec918ca04
commit
bbc15cba92
|
@ -23,7 +23,6 @@ public class Game1 : Game
|
||||||
PreferredBackBufferWidth = 1024,
|
PreferredBackBufferWidth = 1024,
|
||||||
PreferredBackBufferHeight = 576
|
PreferredBackBufferHeight = 576
|
||||||
};
|
};
|
||||||
_spriteBatch = new SpriteBatch(GraphicsDevice);
|
|
||||||
|
|
||||||
Content.RootDirectory = "Content";
|
Content.RootDirectory = "Content";
|
||||||
IsMouseVisible = true;
|
IsMouseVisible = true;
|
||||||
|
@ -41,6 +40,8 @@ public class Game1 : Game
|
||||||
|
|
||||||
protected override void LoadContent()
|
protected override void LoadContent()
|
||||||
{
|
{
|
||||||
|
_spriteBatch = new SpriteBatch(GraphicsDevice);
|
||||||
|
|
||||||
Sprite spriteBox = new Sprite() { Texture2D = Content.Load<Texture2D>("Sprites/Pixel") };
|
Sprite spriteBox = new Sprite() { Texture2D = Content.Load<Texture2D>("Sprites/Pixel") };
|
||||||
Sprite spriteBall = new Sprite() { Texture2D = Content.Load<Texture2D>("Sprites/Circle") };
|
Sprite spriteBall = new Sprite() { Texture2D = Content.Load<Texture2D>("Sprites/Circle") };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue