Esempio n. 1
0
        public IGameMenu CreatePlayStateGameOverMenu()
        {
            var regularFont  = _gameContext.AssetManager.GetFont(GameConstants.GameStateConstants.MenuStateConstants.RegularFontName);
            var selectedFont = _gameContext.AssetManager.GetFont(GameConstants.GameStateConstants.MenuStateConstants.SelectedFontName);

            var playGameOverMenu = new TextMenu(_gameContext, new GameMenuInputComponent(new KeyboardInputController()),
                                                _gameContext.AssetManager.GetSoundEffect(GameConstants.GameStateConstants.MenuStateConstants.Audio.MenuNavigateSoundEffectName));

            playGameOverMenu.SetMenuItems(new List <IMenuOption>()
            {
                new TextMenuOption(_gameContext, OnMainMenuSelectOnePlayer, GameConstants.GameStateConstants.PlayStateConstants.MenuTextPlayAgain, regularFont, selectedFont),
                new TextMenuOption(_gameContext, OnPlayStateSelectQuit, GameConstants.GameStateConstants.PlayStateConstants.MenuTextQuit, regularFont, selectedFont),
            });

            return(playGameOverMenu);
        }
Esempio n. 2
0
        public IGameMenu CreatePlayStatePauseMenu()
        {
            var regularFont  = _gameContext.AssetManager.GetFont(GameConstants.GameStateConstants.MenuStateConstants.RegularFontName);
            var selectedFont = _gameContext.AssetManager.GetFont(GameConstants.GameStateConstants.MenuStateConstants.SelectedFontName);

            var playPauseMenu = new TextMenu(_gameContext, new PlayStatePauseMenuInputComponent(new KeyboardInputController()),
                                             _gameContext.AssetManager.GetSoundEffect(GameConstants.GameStateConstants.MenuStateConstants.Audio.MenuNavigateSoundEffectName));

            playPauseMenu.SetMenuItems(new List <IMenuOption>()
            {
                new TextMenuOption(_gameContext, () => OnPlayStateSelectResume(playPauseMenu), GameConstants.GameStateConstants.PlayStateConstants.MenuTextResume, regularFont, selectedFont),
                //new TextMenuOption(_gameContext, OnPlayStateSelectHelp, GameConstants.GameStates.PlayState.MenuTextHelp, regularFont, selectedFont),
                new TextMenuOption(_gameContext, OnPlayStateSelectQuit, GameConstants.GameStateConstants.PlayStateConstants.MenuTextQuit, regularFont, selectedFont),
            });

            return(playPauseMenu);
        }