Beispiel #1
0
        public Gamepad()
        {
            LeftJoystick  = new GamepadJoystick(AxisType.LeftJoystickX, AxisType.LeftJoystickY);
            RightJoystick = new GamepadJoystick(AxisType.RightJoystickX, AxisType.RightJoystickY);

            Button01 = new GamepadButton(AxisType.Button01);
            Button02 = new GamepadButton(AxisType.Button02);
            Button03 = new GamepadButton(AxisType.Button03);
            Button04 = new GamepadButton(AxisType.Button04);

            ControlMap = new Dictionary <AxisType, IGamepadControl> {
                { AxisType.LeftJoystickX, LeftJoystick },
                { AxisType.LeftJoystickY, LeftJoystick },
                { AxisType.RightJoystickX, RightJoystick },
                { AxisType.RightJoystickY, RightJoystick },
                { AxisType.Button01, Button01 },
                { AxisType.Button02, Button02 },
                { AxisType.Button03, Button03 },
                { AxisType.Button04, Button04 }
            };
        }