コード例 #1
0
        public UnknownDeviceProfile(string joystickName)
        {
            Name = "Unknown Device";
            if (joystickName != "")
            {
                Name += " (" + joystickName + ")";
            }

            Meta        = "";
            Sensitivity = 1.0f;
            DeadZone    = 0.2f;

            SupportedPlatforms = null;
            JoystickNames      = new[] { joystickName };

            AnalogMappings = new InputControlAnalogMapping[MaxUnityAnalogs];
            for (int i = 0; i < MaxUnityAnalogs; i++)
            {
                AnalogMappings[i] = new InputControlAnalogMapping(i);
            }

            ButtonMappings = new InputControlButtonMapping[MaxUnityButtons];
            for (int i = 0; i < MaxUnityButtons; i++)
            {
                ButtonMappings[i] = new InputControlButtonMapping(i);
            }
        }
コード例 #2
0
        public UnknownDeviceProfile( string joystickName )
        {
            Name = "Unknown Device";
            if (joystickName != "")
            {
                Name += " (" + joystickName + ")";
            }

            Meta = "";
            Sensitivity = 1.0f;
            DeadZone = 0.2f;

            SupportedPlatforms = null;
            JoystickNames = new[] { joystickName };

            AnalogMappings = new InputControlAnalogMapping[ MaxUnityAnalogs ];
            for (int i = 0; i < MaxUnityAnalogs; i++)
            {
                AnalogMappings[i] = new InputControlAnalogMapping( i );
            }

            ButtonMappings = new InputControlButtonMapping[ MaxUnityButtons ];
            for (int i = 0; i < MaxUnityButtons; i++)
            {
                ButtonMappings[i] = new InputControlButtonMapping( i );
            }
        }
コード例 #3
0
ファイル: KeyboardProfile.cs プロジェクト: RFDaemoniac/9MG
        public KeyboardProfile()
        {
            Name = "Keyboard";
            Meta = "";

            SupportedPlatforms = new[]
            {
                "Windows",
                "Mac",
                "Linux"
            };

            Sensitivity = 1.0f;
            DeadZone = 0.0f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "Spacebar",
                    Target = InputControlType.Action1,
                    Source = "space"
                },
                new InputControlButtonMapping()
                {
                    Handle = "A Key",
                    Target = InputControlType.Action2,
                    Source = "a"
                },
                new InputControlButtonMapping()
                {
                    Handle = "S Key",
                    Target = InputControlType.Action3,
                    Source = "s"
                },
                new InputControlButtonMapping()
                {
                    Handle = "D Key",
                    Target = InputControlType.Action4,
                    Source = "d"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Arrow Keys X",
                    Target = InputControlType.LeftStickX,
                    Source = "left right"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Arrow Keys Y",
                    Target = InputControlType.LeftStickY,
                    Source = "down up"
                }
            };
        }
コード例 #4
0
        public KeyboardProfile()
        {
            Name = "Keyboard";
            Meta = "";

            SupportedPlatforms = new[]
            {
                "Windows",
                "Mac",
                "Linux"
            };

            Sensitivity = 1.0f;
            DeadZone    = 0.0f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "Spacebar",
                    Target = InputControlType.Action1,
                    Source = "space"
                },
                new InputControlButtonMapping()
                {
                    Handle = "A Key",
                    Target = InputControlType.Action2,
                    Source = "a"
                },
                new InputControlButtonMapping()
                {
                    Handle = "S Key",
                    Target = InputControlType.Action3,
                    Source = "s"
                },
                new InputControlButtonMapping()
                {
                    Handle = "D Key",
                    Target = InputControlType.Action4,
                    Source = "d"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Arrow Keys X",
                    Target = InputControlType.LeftStickX,
                    Source = "left right"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Arrow Keys Y",
                    Target = InputControlType.LeftStickY,
                    Source = "down up"
                }
            };
        }
コード例 #5
0
        public Xbox360WinProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on Windows";

            SupportedPlatforms = new[]
            {
                "Windows"
            };

            JoystickNames = new[]
            {
                "Controller (XBOX 360 For Windows)",
                "Controller (XBOX 360 Wireless Receiver for Windows)"
            };

            Sensitivity = 1.0f;
            DeadZone    = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = "button 2"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Back",
                    Target = InputControlType.Select,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 7"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 3"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 4",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Left",
                    Target      = InputControlType.DPadLeft,
                    Source      = "analog 5",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Right",
                    Target      = InputControlType.DPadRight,
                    Source      = "analog 5",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Up",
                    Target      = InputControlType.DPadUp,
                    Source      = "analog 6",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Down",
                    Target      = InputControlType.DPadDown,
                    Source      = "analog 6",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 8"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 9"
                }
            };
        }
コード例 #6
0
        public Playstation3OuyaProfile()
        {
            Name = "Playstation 3 Controller";
            Meta = "Playstation 3 Controller on OUYA";

            SupportedPlatforms = new[]
            {
                "OUYA"
            };

            JoystickNames = new[]
            {
                "PLAYSTATION(R)3 Controller"
            };

            Sensitivity = 1.0f;
            DeadZone = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "Cross",
                    Target = InputControlType.Action1,
                    Source = "button 14"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Circle",
                    Target = InputControlType.Action2,
                    Source = "button 13"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Square",
                    Target = InputControlType.Action3,
                    Source = "button 15"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Triangle",
                    Target = InputControlType.Action4,
                    Source = "button 12"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 11"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 2"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 4"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 5"
                }
            };
        }
コード例 #7
0
        public Playstation3WinProfile()
        {
            Name = "Playstation 3 Controller";
            Meta = "Playstation 3 Controller on Windows (via MotioninJoy Gamepad Tool)";

            SupportedPlatforms = new[]
            {
                "Windows"
            };

            JoystickNames = new[]
            {
                "MotioninJoy Virtual Game Controller"
            };

            Sensitivity = 1.0f;
            DeadZone = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "Cross",
                    Target = InputControlType.Action1,
                    Source = "button 2"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Circle",
                    Target = InputControlType.Action2,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Square",
                    Target = InputControlType.Action3,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Triangle",
                    Target = InputControlType.Action4,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Select",
                    Target = InputControlType.Select,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 11"
                },
                new InputControlButtonMapping()
                {
                    Handle = "System",
                    Target = InputControlType.System,
                    Source = "button 12"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 5",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "analog 8",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "analog 8",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "analog 9",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "analog 9",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Tilt X",
                    Target = InputControlType.TiltX,
                    Source = "analog 3"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Tilt Y",
                    Target = InputControlType.TiltY,
                    Source = "analog 4"
                }
            };
        }
コード例 #8
0
ファイル: Xbox360OuyaProfile.cs プロジェクト: RFDaemoniac/9MG
        public Xbox360OuyaProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on OUYA";

            SupportedPlatforms = new[]
            {
                "OUYA"
            };

            JoystickNames = new[]
            {
                "Microsoft X-Box 360 pad"
            };

            Sensitivity = 1.0f;
            DeadZone = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 13"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 14"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 11"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "analog 4",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "analog 4",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "analog 5",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "analog 5",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 6"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 7"
                }
            };
        }
コード例 #9
0
        public OuyaProfile()
        {
            Name = "OUYA Controller";
            Meta = "OUYA Controller on OUYA";

            SupportedPlatforms = new[]
            {
                "OUYA"
            };

            JoystickNames = new[]
            {
                "OUYA Game Controller"
            };

            Sensitivity = 1.0f;
            DeadZone    = 0.3f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "O",
                    Target = InputControlType.Action1,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action2,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "U",
                    Target = InputControlType.Action3,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 2"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "button 11"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 4"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 5"
                }
            };
        }
コード例 #10
0
        public Playstation4MacProfile()
        {
            Name = "Playstation 4 Controller";
            Meta = "Playstation 4 Controller on Mac";

            SupportedPlatforms = new[]
            {
                "OS X"
            };

            JoystickNames = new[]
            {
                "Sony Computer Entertainment Wireless Controller"
            };

            Sensitivity = 1.0f;
            DeadZone = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "Cross",
                    Target = InputControlType.Action1,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Circle",
                    Target = InputControlType.Action2,
                    Source = "button 2"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Square",
                    Target = InputControlType.Action3,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Triangle",
                    Target = InputControlType.Action4,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 13"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Options",
                    Target = InputControlType.Select,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 11"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "analog 6",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "analog 6",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "analog 7",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "analog 7",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                }
            };
        }
コード例 #11
0
ファイル: GameStickProfile.cs プロジェクト: hiyijia/InControl
        public GameStickProfile()
        {
            Name = "GameStick Controller";
              Meta = "GameStick Controller on GameStick";

              SupportedPlatforms = new[]
              {
            "GameStick"
              };

              JoystickNames = new[]
              {
            "GameStick Controller 1"
              };

              Sensitivity = 1.0f;
              DeadZone = 0.015f;

              ButtonMappings = new[]
              {
            new InputControlButtonMapping()
            {
              Handle = "A",
              Target = InputControlType.Action1,
              Source = "button 0"
            },
            new InputControlButtonMapping()
            {
              Handle = "B",
              Target = InputControlType.Action2,
              Source = "button 1"
            },
            new InputControlButtonMapping()
            {
              Handle = "X",
              Target = InputControlType.Action3,
              Source = "button 2"
            },
            new InputControlButtonMapping()
            {
              Handle = "Y",
              Target = InputControlType.Action4,
              Source = "button 3"
            },
            new InputControlButtonMapping()
            {
              Handle = "Left Bumper",
              Target = InputControlType.LeftBumper,
              Source = "button 4"
            },
            new InputControlButtonMapping()
            {
              Handle = "Right Bumper",
              Target = InputControlType.RightBumper,
              Source = "button 5"
            },
            new InputControlButtonMapping()
            {
              Handle = "Left Stick Button",
              Target = InputControlType.LeftStickButton,
              Source = "button 8"
            },
            new InputControlButtonMapping()
            {
              Handle = "Right Stick Button",
              Target = InputControlType.RightStickButton,
              Source = "button 9"
            },
            new InputControlButtonMapping()
            {
              Handle = "Start",
              Target = InputControlType.Start,
              Source = "button 10"
            }
              };

              AnalogMappings = new InputControlAnalogMapping[]
              {
            new InputControlAnalogMapping()
            {
              Handle = "Left Stick X",
              Target = InputControlType.LeftStickX,
              Source = "analog 0"
            },
            new InputControlAnalogMapping()
            {
              Handle = "Left Stick Y",
              Target = InputControlType.LeftStickY,
              Source = "analog 1",
              Invert = true
            },
            new InputControlAnalogMapping()
            {
              Handle = "Right Stick X",
              Target = InputControlType.RightStickX,
              Source = "analog 2"
            },
            new InputControlAnalogMapping()
            {
              Handle = "Right Stick Y",
              Target = InputControlType.RightStickY,
              Source = "analog 3",
              Invert = true
            },
            new InputControlAnalogMapping()
            {
              Handle = "DPad Left",
              Target = InputControlType.DPadLeft,
              Source = "analog 4",
              SourceRange = InputControlMapping.Range.Negative,
              TargetRange = InputControlMapping.Range.Negative,
              Invert = true
            },
            new InputControlAnalogMapping()
            {
              Handle = "DPad Right",
              Target = InputControlType.DPadRight,
              Source = "analog 4",
              SourceRange = InputControlMapping.Range.Positive,
              TargetRange = InputControlMapping.Range.Positive
            },
            new InputControlAnalogMapping()
            {
              Handle = "DPad Up",
              Target = InputControlType.DPadUp,
              Source = "analog 5",
              SourceRange = InputControlMapping.Range.Negative,
              TargetRange = InputControlMapping.Range.Negative,
              Invert = true
            },
            new InputControlAnalogMapping()
            {
              Handle = "DPad Down",
              Target = InputControlType.DPadDown,
              Source = "analog 5",
              SourceRange = InputControlMapping.Range.Positive,
              TargetRange = InputControlMapping.Range.Positive
            },
              };
        }
コード例 #12
0
ファイル: OuyaProfile.cs プロジェクト: RFDaemoniac/9MG
        public OuyaProfile()
        {
            Name = "OUYA Controller";
            Meta = "OUYA Controller on OUYA";

            SupportedPlatforms = new[]
            {
                "OUYA"
            };

            JoystickNames = new[]
            {
                "OUYA Game Controller"
            };

            Sensitivity = 1.0f;
            DeadZone = 0.3f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "O",
                    Target = InputControlType.Action1,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action2,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "U",
                    Target = InputControlType.Action3,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 2"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "button 11"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 4"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 5"
                }
            };
        }
コード例 #13
0
        public Xbox360WirelessOuyaProfile()
        {
            Name = "XBox 360 Wireless Controller";
            Meta = "XBox 360 Wireless Controller on OUYA";

            SupportedPlatforms = new[]
            {
                "OUYA"
            };

            JoystickNames = new[]
            {
                "Xbox 360 Wireless Receiver"
            };

            Sensitivity = 1.0f;
            DeadZone    = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = "button 0"                                 // Warning! dpad left also maps to button 0
                },
                new InputControlButtonMapping()
                {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = "button 1"                                 // Warning! dpad right also maps to button 1
                },
                new InputControlButtonMapping()
                {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = "button 3"                                 // Warning! dpad down also maps to button 3
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 13"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 14"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 11"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "button 0"                                 // Warning! A button also maps to button 0
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "button 1"                                 // Warning! B button also maps to button 1
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "button 2"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "button 3"                                 // Warning! X button also maps to button 3
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 4"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 5"
                }
            };
        }
コード例 #14
0
        public Playstation3WinProfile()
        {
            Name = "Playstation 3 Controller";
            Meta = "Playstation 3 Controller on Windows (via MotioninJoy Gamepad Tool)";

            SupportedPlatforms = new[]
            {
                "Windows"
            };

            JoystickNames = new[]
            {
                "MotioninJoy Virtual Game Controller"
            };

            Sensitivity = 1.0f;
            DeadZone    = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "Cross",
                    Target = InputControlType.Action1,
                    Source = "button 2"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Circle",
                    Target = InputControlType.Action2,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Square",
                    Target = InputControlType.Action3,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Triangle",
                    Target = InputControlType.Action4,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Select",
                    Target = InputControlType.Select,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 11"
                },
                new InputControlButtonMapping()
                {
                    Handle = "System",
                    Target = InputControlType.System,
                    Source = "button 12"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 5",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Left",
                    Target      = InputControlType.DPadLeft,
                    Source      = "analog 8",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Right",
                    Target      = InputControlType.DPadRight,
                    Source      = "analog 8",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Up",
                    Target      = InputControlType.DPadUp,
                    Source      = "analog 9",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Down",
                    Target      = InputControlType.DPadDown,
                    Source      = "analog 9",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Tilt X",
                    Target = InputControlType.TiltX,
                    Source = "analog 3"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Tilt Y",
                    Target = InputControlType.TiltY,
                    Source = "analog 4"
                }
            };
        }
コード例 #15
0
        public Playstation3MacProfile()
        {
            Name = "Playstation 3 Controller";
            Meta = "Playstation 3 Controller on Mac";

            SupportedPlatforms = new[]
            {
                "OS X"
            };

            JoystickNames = new[]
            {
                "Sony PLAYSTATION(R)3 Controller"
            };

            Sensitivity = 1.0f;
            DeadZone    = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "Cross",
                    Target = InputControlType.Action1,
                    Source = "button 14"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Circle",
                    Target = InputControlType.Action2,
                    Source = "button 13"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Square",
                    Target = InputControlType.Action3,
                    Source = "button 15"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Triangle",
                    Target = InputControlType.Action4,
                    Source = "button 12"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 11"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Select",
                    Target = InputControlType.Select,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 2"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                }
            };
        }
コード例 #16
0
ファイル: Xbox360WinProfile.cs プロジェクト: RFDaemoniac/9MG
        public Xbox360WinProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on Windows";

            SupportedPlatforms = new[]
            {
                "Windows"
            };

            JoystickNames = new[]
            {
                "Controller (XBOX 360 For Windows)",
                "Controller (XBOX 360 Wireless Receiver for Windows)"
            };

            Sensitivity = 1.0f;
            DeadZone = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = "button 2"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Back",
                    Target = InputControlType.Select,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 7"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 3"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 4",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "analog 5",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "analog 5",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "analog 6",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "analog 6",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 8"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 9"
                }
            };
        }
コード例 #17
0
        public Xbox360OuyaProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on OUYA";

            SupportedPlatforms = new[]
            {
                "OUYA"
            };

            JoystickNames = new[]
            {
                "Microsoft X-Box 360 pad"
            };

            Sensitivity = 1.0f;
            DeadZone    = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = "button 0"
                },
                new InputControlButtonMapping()
                {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = "button 1"
                },
                new InputControlButtonMapping()
                {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = "button 3"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 4"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 13"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 14"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 11"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Left",
                    Target      = InputControlType.DPadLeft,
                    Source      = "analog 4",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Right",
                    Target      = InputControlType.DPadRight,
                    Source      = "analog 4",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Up",
                    Target      = InputControlType.DPadUp,
                    Source      = "analog 5",
                    SourceRange = InputControlMapping.Range.Negative,
                    TargetRange = InputControlMapping.Range.Negative,
                    Invert      = true
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "DPad Down",
                    Target      = InputControlType.DPadDown,
                    Source      = "analog 5",
                    SourceRange = InputControlMapping.Range.Positive,
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 6"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 7"
                }
            };
        }
コード例 #18
0
        public Xbox360MacProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on Mac";

            SupportedPlatforms = new[]
            {
                "OS X"
            };

            JoystickNames = new[]
            {
                "",
                "Microsoft Wireless 360 Controller"
            };

            Sensitivity = 1.0f;
            DeadZone    = 0.2f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = "button 16"
                },
                new InputControlButtonMapping()
                {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = "button 17"
                },
                new InputControlButtonMapping()
                {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = "button 18"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 19"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 13"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 14"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 11"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 12"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Back",
                    Target = InputControlType.Select,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "System",
                    Target = InputControlType.System,
                    Source = "button 15"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "Left Trigger",
                    Target      = InputControlType.LeftTrigger,
                    Source      = "analog 4",
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle      = "Right Trigger",
                    Target      = InputControlType.RightTrigger,
                    Source      = "analog 5",
                    TargetRange = InputControlMapping.Range.Positive
                }
            };
        }
コード例 #19
0
ファイル: Xbox360MacProfile.cs プロジェクト: RFDaemoniac/9MG
        public Xbox360MacProfile()
        {
            Name = "XBox 360 Controller";
            Meta = "XBox 360 Controller on Mac";

            SupportedPlatforms = new[]
            {
                "OS X"
            };

            JoystickNames = new[]
            {
                "",
                "Microsoft Wireless 360 Controller"
            };

            Sensitivity = 1.0f;
            DeadZone = 0.3f;

            ButtonMappings = new[]
            {
                new InputControlButtonMapping()
                {
                    Handle = "A",
                    Target = InputControlType.Action1,
                    Source = "button 16"
                },
                new InputControlButtonMapping()
                {
                    Handle = "B",
                    Target = InputControlType.Action2,
                    Source = "button 17"
                },
                new InputControlButtonMapping()
                {
                    Handle = "X",
                    Target = InputControlType.Action3,
                    Source = "button 18"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Y",
                    Target = InputControlType.Action4,
                    Source = "button 19"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Up",
                    Target = InputControlType.DPadUp,
                    Source = "button 5"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Down",
                    Target = InputControlType.DPadDown,
                    Source = "button 6"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Left",
                    Target = InputControlType.DPadLeft,
                    Source = "button 7"
                },
                new InputControlButtonMapping()
                {
                    Handle = "DPad Right",
                    Target = InputControlType.DPadRight,
                    Source = "button 8"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Bumper",
                    Target = InputControlType.LeftBumper,
                    Source = "button 13"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Bumper",
                    Target = InputControlType.RightBumper,
                    Source = "button 14"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Left Stick Button",
                    Target = InputControlType.LeftStickButton,
                    Source = "button 11"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Right Stick Button",
                    Target = InputControlType.RightStickButton,
                    Source = "button 12"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Start",
                    Target = InputControlType.Start,
                    Source = "button 9"
                },
                new InputControlButtonMapping()
                {
                    Handle = "Back",
                    Target = InputControlType.Select,
                    Source = "button 10"
                },
                new InputControlButtonMapping()
                {
                    Handle = "System",
                    Target = InputControlType.System,
                    Source = "button 15"
                }
            };

            AnalogMappings = new InputControlAnalogMapping[]
            {
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick X",
                    Target = InputControlType.LeftStickX,
                    Source = "analog 0"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Stick Y",
                    Target = InputControlType.LeftStickY,
                    Source = "analog 1",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick X",
                    Target = InputControlType.RightStickX,
                    Source = "analog 2"
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Stick Y",
                    Target = InputControlType.RightStickY,
                    Source = "analog 3",
                    Invert = true
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Left Trigger",
                    Target = InputControlType.LeftTrigger,
                    Source = "analog 4",
                    TargetRange = InputControlMapping.Range.Positive
                },
                new InputControlAnalogMapping()
                {
                    Handle = "Right Trigger",
                    Target = InputControlType.RightTrigger,
                    Source = "analog 5",
                    TargetRange = InputControlMapping.Range.Positive
                }
            };
        }