예제 #1
0
        internal static bool TryParse(string[] values, out ControlBinding binding)
        {
            List <Keys>      keys    = new List <Keys>(values.Length);
            List <Ds4Button> buttons = new List <Ds4Button>(values.Length);

            foreach (var keyString in values)
            {
                if (Enum.TryParse(keyString, out Keys key))
                {
                    keys.Add(key);
                }
                else if (Enum.TryParse(keyString, out Ds4Button button))
                {
                    buttons.Add(button);
                }
            }

            binding = new ControlBinding(keys.ToArray(), buttons.ToArray());

            return(true);
        }
예제 #2
0
 public static bool IsAnyTapped(ControlBinding binding) => binding.IsAnyTapped();
예제 #3
0
 public static bool IsAnyReleased(ControlBinding binding) => binding.IsAnyReleased();
예제 #4
0
 public static bool IsAnyDown(ControlBinding binding) => binding.IsAnyDown();