Ejemplo n.º 1
0
        // ------------------
        public GamepadProfile()
        {
            this.name = "New Profile";
            this.joystickIdentifier = "Device Identifier";
            this.profileMode        = ProfileMode.Normal;

            this.unityVerFrom = "4.7";
            this.unityVerTo   = "9.9";



            this.dpad       = new JoystickSource();
            this.leftStick  = new JoystickSource();
            this.rightStick = new JoystickSource();

            this.keyFaceU  = KeySource.Empty();
            this.keyFaceR  = KeySource.Empty();
            this.keyFaceD  = KeySource.Empty();
            this.keyFaceL  = KeySource.Empty();
            this.keyStart  = KeySource.Empty();
            this.keySelect = KeySource.Empty();
            this.keyL1     = KeySource.Empty();
            this.keyR1     = KeySource.Empty();
            this.keyL2     = KeySource.Empty();
            this.keyR2     = KeySource.Empty();
            this.keyL3     = KeySource.Empty();
            this.keyR3     = KeySource.Empty();
        }
Ejemplo n.º 2
0
        // --------------------
        public GamepadProfile(
            string name,
            string deviceIdentifier,
            ProfileMode profileMode,
            string unityVerFrom,
            string unityVerTo,
            JoystickSource leftStick,
            JoystickSource rightStick,
            JoystickSource dpad,
            KeySource keyFaceD,
            KeySource keyFaceR,
            KeySource keyFaceL,
            KeySource keyFaceU,
            KeySource keySelect,
            KeySource keyStart,
            KeySource keyL1,
            KeySource keyR1,
            KeySource keyL2,
            KeySource keyR2,
            KeySource keyL3,
            KeySource keyR3)
        {
            this.name = name;
            this.joystickIdentifier = deviceIdentifier;
            this.profileMode        = profileMode;
            //this.platformFlags        = platformFlags;
            this.unityVerFrom = (string.IsNullOrEmpty(unityVerFrom)   ? "4.3" : unityVerFrom);
            this.unityVerTo   = (string.IsNullOrEmpty(unityVerTo)     ? "9.9" : unityVerTo);



            //this.sticks	= new JoystickSource[GamepadManager.GamepadStickCount];
            //this.keys	= new KeySource[GamepadManager.GamepadKeyCount];

            this.leftStick  = (leftStick != null)   ? leftStick     : JoystickSource.Empty();
            this.rightStick = (rightStick != null)  ? rightStick    : JoystickSource.Empty();
            this.dpad       = (dpad != null)                ? dpad                  : JoystickSource.Empty();

            this.keyFaceU = (keyFaceU != null)    ? keyFaceU              : KeySource.Empty();
            this.keyFaceR = (keyFaceR != null)    ? keyFaceR              : KeySource.Empty();
            this.keyFaceD = (keyFaceD != null)    ? keyFaceD              : KeySource.Empty();
            this.keyFaceL = (keyFaceL != null)    ? keyFaceL              : KeySource.Empty();

            this.keyStart  = (keyStart != null)    ? keyStart              : KeySource.Empty();
            this.keySelect = (keySelect != null)   ? keySelect             : KeySource.Empty();

            this.keyL1 = (keyL1 != null)               ? keyL1         : KeySource.Empty();
            this.keyR1 = (keyR1 != null)               ? keyR1         : KeySource.Empty();
            this.keyL2 = (keyL2 != null)               ? keyL2         : KeySource.Empty();
            this.keyR2 = (keyR2 != null)               ? keyR2         : KeySource.Empty();
            this.keyL3 = (keyL3 != null)               ? keyL3         : KeySource.Empty();
            this.keyR3 = (keyR3 != null)               ? keyR3         : KeySource.Empty();
        }