public static void Update() { switch (MenuState) { case MenuState.TitleScreen: if (InputHelper.WasButtonPressed(PlayerIndex.One, Buttons.A) || InputHelper.WasButtonPressed(PlayerIndex.One, Buttons.Start) || InputHelper.WasKeyPressed(Keys.Space) || InputHelper.WasKeyPressed(Keys.Enter)) { MenuState = MenuState.MainMenu; } break; case MenuState.MainMenu: // Menu Navigation if (InputHelper.WasButtonPressed(PlayerIndex.One, Buttons.DPadUp) || (InputHelper.NGS[(int)PlayerIndex.One].ThumbSticks.Left.Y <0.3 && InputHelper.NGS[(int)PlayerIndex.One].ThumbSticks.Left.Y> 0.3) || InputHelper.WasKeyPressed(Keys.Up)) { currentMenuItem--; if (currentMenuItem < 0) { currentMenuItem = menuItems.Count - 1; } SoundManager.PlaySound("PickUpItem"); } if (InputHelper.WasButtonPressed(PlayerIndex.One, Buttons.DPadDown) || (InputHelper.NGS[(int)PlayerIndex.One].ThumbSticks.Left.Y <-0.3 && InputHelper.NGS[(int)PlayerIndex.One].ThumbSticks.Left.Y> -0.3) || InputHelper.WasKeyPressed(Keys.Down)) { currentMenuItem++; if (currentMenuItem >= menuItems.Count) { currentMenuItem = 0; } SoundManager.PlaySound("PickUpItem"); } //Menu Item Actions if (InputHelper.WasButtonPressed(PlayerIndex.One, Buttons.A) || (InputHelper.WasKeyPressed(Keys.Space)) || (InputHelper.WasKeyPressed(Keys.Enter))) { SoundManager.PlaySound("PickUpItem"); switch (currentMenuItem) { case 0: // Begin Game GameManager.GameState = GameState.Playing; GameManager.CreateLevels(); MusicManager.StopSong(); MusicManager.PlaySong("music01"); MusicManager.SetRepeating(true); break; case 1: // How To Play GameManager.GameState = GameState.HowToPlay; break; case 2: // Exit Game Game1.ExitGame(); break; } } break; } }