public static bool CheckAll(List <object> list, KeyStringMethod byString, KeyCodeMethod byCode) { foreach (var param in list) { if (!Check(param, byString, byCode)) { return(false); } } return(true); }
public bool Check(KeyStringMethod byString, KeyCodeMethod byCode) { var lim = (keys.Count > 1 ? keys.Count - 1 : keys.Count); if (!KeyBinding.CheckAll(keys.GetRange(0, lim), Input.GetKey, Input.GetKey)) { return(false); } if (lim < keys.Count) { return(KeyBinding.Check(keys[keys.Count - 1], byString, byCode)); } return(false); }
public static bool Check(object param, KeyStringMethod byString, KeyCodeMethod byCode) { return((param is string && byString((string)param)) || (param is KeyCode && byCode((KeyCode)param)) || (param is KeyCombo && ((KeyCombo)param).Check(byString, byCode))); }