protected override void Draw(GameTime gameTime)
{
graphics.GraphicsDevice.Clear(Color.Black);
gsm.GameStateChanger(currentGameState);
switch (currentGameState)
{
case 1:
//Intro
spriteBatch.Begin();
background.Draw(spriteBatch);
intro.Draw(spriteBatch);
spriteBatch.End();
break;
case 2:
spriteBatch.Begin();
background.Draw(spriteBatch);
mainMenu.Draw(gameTime, graphics.GraphicsDevice, spriteBatch);
spriteBatch.End();
currentGameState = mainMenu.GetCurrentGamestate();
break;
case 3:
//The Game
spriteBatch.Begin();
background.Draw(spriteBatch);
foreach (Weapon wep in p.weapList)
{
wep.Draw(spriteBatch);
}
foreach (Asteroid a in asteroid)
{
a.Draw(spriteBatch, Content);
}
//alien.Draw(spriteBatch);
p.Draw(spriteBatch);
hud.Draw(spriteBatch, p.GetLife());
spriteBatch.End();
break;
case 4:
//Game Over
break;
case 5:
//Options
oMenu.Draw(spriteBatch);
break;
case 6:
//Highscores
break;
case 7:
//Keybindings
break;
case 8:
//Loading Screen
if (loadingScreen != null)
{
spriteBatch.Begin();
background.Draw(spriteBatch);
loadingScreen.Draw(spriteBatch);
spriteBatch.End();
}
else
{
currentGameState = 1;
}
break;
default:
break;
}
base.Draw(gameTime);
}