/// <summary> /// Checks if the given axis has just been 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 has just been pressed, otherwise false. /// </returns> public bool AxisJustPressed(InputDevice dev, string axis) { if (dev is InputDevice.Mouse) { return(Mouse.AxisJustPressed(axis)); } else if (dev is InputDevice.Joystick) { return(Joystick.AxisJustPressed(axis)); } return(false); }