public override object GetValue(ConnectorViewModel connector, object context) { if (controller.IsConnected && cState.HasValue) { if (conLeftThumbX == connector) { return(NodeDataNumeric.FromInt16(cState.Value.Gamepad.LeftThumbX)); } if (conLeftThumbY == connector) { return(NodeDataNumeric.FromInt16(cState.Value.Gamepad.LeftThumbY)); } if (conLeftTrigger == connector) { return(NodeDataNumeric.FromByte(cState.Value.Gamepad.LeftTrigger)); } if (conRightThumbX == connector) { return(NodeDataNumeric.FromInt16(cState.Value.Gamepad.RightThumbX)); } if (conRightThumbY == connector) { return(NodeDataNumeric.FromInt16(cState.Value.Gamepad.RightThumbY)); } if (conRightTrigger == connector) { return(NodeDataNumeric.FromByte(cState.Value.Gamepad.RightTrigger)); } //if (conButtons == connector) // return new NodeDataXInputButtons(cState.Value.Gamepad.Buttons); } return(null); }
public override object GetValue(ConnectorViewModel connector, object context) { if (conLeftThumbDeadZone == connector) { return(NodeDataNumeric.FromInt16(SharpDX.XInput.Gamepad.LeftThumbDeadZone)); } if (conRightThumbDeadZone == connector) { return(NodeDataNumeric.FromInt16(SharpDX.XInput.Gamepad.RightThumbDeadZone)); } if (conTriggerThreshold == connector) { return(NodeDataNumeric.FromByte(SharpDX.XInput.Gamepad.TriggerThreshold)); } return(null); }