private EatableEntities CreateFoodInventoryItem(Pickupable item)
        {
            var eatable = new EatableEntities();

            eatable.Initialize(item, false);
            return(eatable);
        }
Ejemplo n.º 2
0
        private static EatableEntities GetEatableData(InventoryItem item)
        {
            var eatableEntity = new EatableEntities();

            eatableEntity.Initialize(item.item, false);
            return(eatableEntity);
        }
        public void AddItem(InventoryItem item, bool fromSave = false, float timeDecayPause = 0)
        {
            if (IsFull)
            {
                return;
            }

            var eatableEntity = new EatableEntities();

            eatableEntity.Initialize(item.item);
            eatableEntity.PauseDecay();
            if (fromSave)
            {
                eatableEntity.TimeDecayPause = timeDecayPause;
            }
            FridgeItems.Add(eatableEntity);
            OnContainerUpdate?.Invoke(NumberOfItems, _itemLimit);
            Destroy(item.item);
        }