public override void HandleInput(GameTime gameTime, InputState input) { if (ScreenState == ScreenState.TransitionOff || ScreenState == ScreenState.TransitionOn) return; PlayerIndex indx; if (next.Evaluate(input, ControllingPlayer, out indx)) { if (index != bosses.Count() - 1) { SoundManager.Play("SelectChanged"); string key = bosses[index + 1].SpriteKey; ExitScreen(); BossScreen newS = new BossScreen(spriteSheet); newS.index = index + 1; nextIndex = index + 1; newS.lastIndex = index; newS.currentKey = key; newS.OnExit += MainMenuScreen.BossScreenExited; #if XBOX if (!StorageHelper.CheckStorage()) { CallExit(); return; } #endif Manager.AddScreen(newS, ControllingPlayer); } } if (previous.Evaluate(input, ControllingPlayer, out indx)) { if (index != 0) { SoundManager.Play("SelectChanged"); string key = bosses[index - 1].SpriteKey; ExitScreen(); BossScreen newS = new BossScreen(spriteSheet); newS.index = index - 1; nextIndex = index - 1; newS.lastIndex = index; newS.currentKey = key; newS.OnExit += MainMenuScreen.BossScreenExited; #if XBOX if (!StorageHelper.CheckStorage()) { CallExit(); return; } #endif Manager.AddScreen(newS, ControllingPlayer); } } if (cancel.Evaluate(input, ControllingPlayer, out indx)) { ExitScreen(); nextIndex = -1; CallExit(); SoundManager.Play("MenuCancel"); } }
private void BossMenuEntrySelected(object sender, PlayerIndexEventArgs e) { bool storage = true; #if XBOX storage = StorageHelper.CheckStorage(); #endif if (storage) { bossBackdrop = new BackgroundScreen("Textures/GameMenu", TransitionType.Slide); Manager.AddScreen(bossBackdrop, e.PlayerIndex); } BossScreen bosses = new BossScreen(ScreenHelper.SpriteSheet); bosses.OnExit += new EventHandler(BossScreenExited); Manager.AddScreen(bosses, e.PlayerIndex); }