Ejemplo n.º 1
0
        public static GamePadController SetupMenuGamepad(PlayerIndex player, Menu menu, Scene scene)
        {
            GamePadController gamepad = new GamePadController(player);

            // Add commands here
            gamepad.AddSystemCommand((int)Buttons.DPadUp, new ScrollUpCommand(menu));
            gamepad.AddSystemCommand((int)Buttons.DPadDown, new ScrollDownCommand(menu));

            return(gamepad);
        }
Ejemplo n.º 2
0
        public static GamePadController SetupLevelGamepad(PlayerIndex player, PlayerChar playerChar, Scene scene)
        {
            GamePadController gamepad = new GamePadController(player);

            // Add commands here
            gamepad.AddPlayerCommand((int)Buttons.DPadUp, new UpCommand(playerChar));
            gamepad.AddPlayerCommand((int)Buttons.DPadDown, new DownCommand(playerChar));
            gamepad.AddPlayerCommand((int)Buttons.DPadLeft, new LeftCommand(playerChar));
            gamepad.AddPlayerCommand((int)Buttons.DPadRight, new RightCommand(playerChar));

            return(gamepad);
        }