public void drawHUD(SpriteBatch spriteBatch) { switch (State) { case state.Playing: playingState.drawHUD(spriteBatch); break; case state.Menu: menuState.drawHUD(spriteBatch); break; case state.Pause: pauseState.drawHUD(spriteBatch); break; case state.Settings: settingsState.drawHUD(spriteBatch); break; case state.PauseSettings: pausesettingsState.drawHUD(spriteBatch); break; case state.Victory: victoryState.drawHUD(spriteBatch); break; case state.Defeat: defeatState.drawHUD(spriteBatch); break; } }