// Returns false if any key was previously used or is not relesed public static bool AllKeysReleased(params Keys[] keys) { if (keys.Any(k => BlockList.Contains(k))) { return(false); } return(keys.All(k => { if (!KeyState.IsKeyUp(k) || !PreviousKeyState.IsKeyDown(k)) { return false; } BlockList.Add(k); return true; })); }
// Returns false if all keys were previously used or are down public static bool AnyKeysUp(params Keys[] keys) { if (keys.All(k => BlockList.Contains(k))) { return(false); } return(keys.Any(k => { if (!KeyState.IsKeyUp(k)) { return true; } BlockList.Add(k); return false; })); }
public bool HasUserBlocked(LobbyUser otherUser) { return(BlockList.Contains(otherUser.Name)); }
public static bool IsBlocked(Keys key) { return(BlockList.Contains(key)); }