Ejemplo n.º 1
0
        public bool AddItemToInventory(IItem item)
        {
            var selectedStack = GetStackForItem(item);
            var successful    = selectedStack?.AddItem(item);

            if (!successful.HasValue || !successful.Value)
            {
                return(false);
            }

            ItemPickup?.Invoke(item);
            return(true);
        }