Ejemplo n.º 1
0
        protected void RefreshCommands()
        {
            RaisePropertyChanged(nameof(ResumingGameIsPossible));
            ResignCommand.RaiseCanExecuteChanged();
            LifeAndDeathDoneCommand.RaiseCanExecuteChanged();
            ResumeGameCommand.RaiseCanExecuteChanged();
            RequestUndoDeathMarksCommand.RaiseCanExecuteChanged();

            UpdateCanPassAndUndo();
        }
Ejemplo n.º 2
0
        private Dictionary <Buttons, ICommand> GetGamepadMappings(IGameState gameState)
        {
            ItemSelectionGameState gameStateCast = (ItemSelectionGameState)gameState;
            ICommand resumeGameCommand           = new ResumeGameCommand(gameState);

            return(new Dictionary <Buttons, ICommand>
            {
                { Buttons.B, resumeGameCommand },
                { Buttons.X, resumeGameCommand },
                { Buttons.LeftThumbstickUp, new MoveSelectorCommand(gameStateCast.InventoryMenu, Constants.Direction.Up) },
                { Buttons.LeftThumbstickRight, new MoveSelectorCommand(gameStateCast.InventoryMenu, Constants.Direction.Right) },
                { Buttons.LeftThumbstickDown, new MoveSelectorCommand(gameStateCast.InventoryMenu, Constants.Direction.Down) },
                { Buttons.LeftThumbstickLeft, new MoveSelectorCommand(gameStateCast.InventoryMenu, Constants.Direction.Left) },
                { Buttons.DPadUp, new MoveSelectorCommand(gameStateCast.InventoryMenu, Constants.Direction.Up) },
                { Buttons.DPadRight, new MoveSelectorCommand(gameStateCast.InventoryMenu, Constants.Direction.Right) },
                { Buttons.DPadDown, new MoveSelectorCommand(gameStateCast.InventoryMenu, Constants.Direction.Down) },
                { Buttons.DPadLeft, new MoveSelectorCommand(gameStateCast.InventoryMenu, Constants.Direction.Left) }
            });
        }
        private Dictionary <Buttons, ICommand> GetGamepadMappings(IGameState gameState)
        {
            PauseGameState gameStateCast     = (PauseGameState)gameState;
            ICommand       resumeGameCommand = new ResumeGameCommand(gameState);

            return(new Dictionary <Buttons, ICommand>
            {
                { Buttons.Start, resumeGameCommand },
                { Buttons.B, resumeGameCommand },
                { Buttons.LeftThumbstickUp, new MoveSelectorCommand(gameStateCast.PauseGameMenu, Constants.Direction.Up) },
                { Buttons.LeftThumbstickRight, new MoveSelectorCommand(gameStateCast.PauseGameMenu, Constants.Direction.Right) },
                { Buttons.LeftThumbstickDown, new MoveSelectorCommand(gameStateCast.PauseGameMenu, Constants.Direction.Down) },
                { Buttons.LeftThumbstickLeft, new MoveSelectorCommand(gameStateCast.PauseGameMenu, Constants.Direction.Left) },
                { Buttons.DPadUp, new MoveSelectorCommand(gameStateCast.PauseGameMenu, Constants.Direction.Up) },
                { Buttons.DPadRight, new MoveSelectorCommand(gameStateCast.PauseGameMenu, Constants.Direction.Right) },
                { Buttons.DPadDown, new MoveSelectorCommand(gameStateCast.PauseGameMenu, Constants.Direction.Down) },
                { Buttons.DPadLeft, new MoveSelectorCommand(gameStateCast.PauseGameMenu, Constants.Direction.Left) },
                { Buttons.A, new SelectButtonCommand(gameStateCast.PauseGameMenu.ButtonSelector, GetButtonMappings(gameState)) }
            });
        }