Original Post
So I decided to start a new project and the first thing I wanted to do was right up the GameState part for my startMenu and then my GameMenu. So I wrote everything, I have a startMenu background and when I go to run it it loads up the startmenu screen but when I press enter, nothing happens. I tried taking away the 'If' statement (below) and it switched the screens on the startup just fine. Im really getting frustrated because this shold be working but if someone could help me that would be great.
UpdateStartMenu:
The Drawing:
I cant figure out why its not working and its really frustrating me because this should be pretty simple. So if you could help me that would be great!
UpdateStartMenu:
private void UpdateStartMenu()
{
KeyboardState ks = new KeyboardState();
if (ks.IsKeyDown(Keys.Enter))
{
mStartMenu = false;
mGame = true;
}
}
The Drawing:
protected override void Draw(GameTime gameTime)
{
spriteBatch.Begin();
// TODO: Add your drawing code here
if (mStartMenu)
{
spriteBatch.Draw(startMenu, new Rectangle(0, 0, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight), Color.White);
}
else if(mGame)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
}
spriteBatch.End();
base.Draw(gameTime);
}
I cant figure out why its not working and its really frustrating me because this should be pretty simple. So if you could help me that would be great!