Esempio n. 1
0
            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);
            }
Esempio n. 2
0
 public static float GetAxis(string name)
 {
     return(currentDevice.GetAxis(name));
 }