public bool AddItem(MovingObject mo, Item item) { if (items.Count >= capacity) { if (DateTime.Now - lastMessageTime > TimeSpan.FromSeconds(2)) { lastMessageTime = DateTime.Now; mo.CreateFloatingText("Inventory Full", Color.grey); } return(false); } items.Add(item); return(true); }