Пример #1
0
        /// <summary>
        ///   Checks if the given axis has just been released 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 released, otherwise false.
        /// </returns>
        public bool AxisJustReleased(InputDevice dev, string axis)
        {
            if (dev is InputDevice.Mouse)
            {
                return(Mouse.AxisJustReleased(axis));
            }
            else if (dev is InputDevice.Joystick)
            {
                return(Joystick.AxisJustReleased(axis));
            }

            return(false);
        }