public void Draw(SpriteBatch spriteBatch) { //use transitioner for drawing during rooom transition if (transitioner.transitioning()) { transitioner.Draw(spriteBatch); return; } //NORMAL STUFF if (state == GameState.PLAYING) { if (hud.hudY != 0) { hud.hudY = 0; } hud.Draw(spriteBatch); rooms[roomKey].Draw(spriteBatch); player.Draw(spriteBatch); } //START else if (state == GameState.START) { start.Draw(spriteBatch); } //item selection else if (state == GameState.ITEMSELECTION) { if (hud.hudY != (176 * 2)) { hud.hudY = (176 * 2); } hud.Draw(spriteBatch); itemScreen.Draw(spriteBatch, rooms.Keys); } //Pause Screen else if (state == GameState.PAUSE) { pause.Draw(spriteBatch); } //game over else if (state == GameState.LOSE) { //sound.pDies(); gameOver.Draw(spriteBatch); } else if (state == GameState.WIN) { win.Draw(spriteBatch); player.Draw(spriteBatch); } //decrement delay if we are waiting on win or lose screen //if (gameOverWinScreenCooldown > 0) gameOverWinScreenCooldown--; }
public void Draw(SpriteBatch spriteBatch) { //NORMAL STUFF if (state == GameState.PLAYING) { if (hud.hudY != 0) { hud.hudY = 0; } hud.Draw(spriteBatch); rooms[roomKey].Draw(spriteBatch); player.Draw(spriteBatch); } //item selection else if (state == GameState.ITEMSELECTION) { if (hud.hudY != (176 * 2)) { hud.hudY = (176 * 2); } hud.Draw(spriteBatch); itemScreen.Draw(spriteBatch, rooms.Keys); } //Pause Screen else if (state == GameState.PAUSE) { pause.Draw(spriteBatch); } //game over else if (state == GameState.LOSE) { gameOver.Draw(spriteBatch); } else if (state == GameState.WIN) { win.Draw(spriteBatch); player.Draw(spriteBatch); } }