/// <summary> /// Checks if the given axis is pressed on the given device. /// </summary> /// <param name="dev"> /// The input device. /// </param> /// <param name="axis"> /// The axis to check. /// </param> /// <returns> /// True if the axis is valid for the given device and is pressed, otherwise false. /// </returns> public bool AxisIsPressed(InputDevice dev, string axis) { if (dev is InputDevice.Mouse) { return(Mouse.AxisIsPressed(axis)); } else if (dev is InputDevice.Joystick) { return(Joystick.AxisIsPressed(axis)); } return(false); }