示例#1
0
        private void TellGamePad(InputListener listener)
        {
            foreach (var button in MappedGamePadButtons)
            {
                if (GamePadButtonsPressedOnce[button])
                    listener.DoGamePadButtonPressedOnce(Player, button);

                if (GamePadButtonsReleased[button])
                    listener.DoGamePadButtonReleased(Player, button);
            }


            if (GamePadJoystickMoved[Buttons.LeftStick] != Vector3.Zero)
                listener.DoGamePadJoystickMoved(Player, Buttons.LeftStick, GamePadJoystickMoved[Buttons.LeftStick]);


            if (GamePadJoystickMoved[Buttons.RightStick] != Vector3.Zero)
                listener.DoGamePadJoystickMoved(Player, Buttons.RightStick, GamePadJoystickMoved[Buttons.RightStick]);
        }