/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { exiter = menu.UpdateScreen(gameTime, gameOver); if (exiter == true) { this.Exit(); } if (menu.currentScreen == heart.MenuClass.Screen.Game) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) { this.Exit(); } bc.Update(gameTime); sc.Update(gameTime, expIsNow); recName = itemSprite1.Update(gameTime, bc, sc); gameOver = hc.Update(gameTime, recName); } if (menu.currentScreen == heart.MenuClass.Screen.Pause) { UpdateInput(); } if (menu.currentScreen == heart.MenuClass.Screen.Info) { } if (menu.currentScreen == heart.MenuClass.Screen.GameOver) { LoadContent(); } if (menu.currentScreen == heart.MenuClass.Screen.Score) { } base.Update(gameTime); }