public float?GetAxisMaybe(IList <IInputDevice> devices) { for (int i = 0; i < devices.Count; ++i) { IInputDevice device = devices[i]; foreach (var map in inputMaps) { if (map != null && !map.IsEmpty) { var value = device.GetAxis(map); if (value.HasValue) { return(value.Value); } } } } return(null); }
public static float GetAxis(string name) { return(currentDevice.GetAxis(name)); }