Пример #1
0
 public bool Interact(ACustomItem item)
 {
     if (item.IsSellable())
     {
         item.FreeItemSlot();
         PlayerMoneyInLevel.Instance.LooseMoney(ItemsCost.ComputeItemCost(item));
         Destroy(item.gameObject);
         return(true);
     }
     return(false);
 }
    public bool Interact(ACustomItem item)
    {
        int itemIndexInOrder = GetItemIndexInOrder(item);

        if (item.IsSellable() && itemIndexInOrder != -1)
        {
            Info.orderItems[itemIndexInOrder].IsGiven = true;
            _displayOrderUI.ShowItemAsGiven(itemIndexInOrder);
            item.FreeItemSlot();
            Destroy(item.gameObject);
            if (IsOrderComplete())
            {
                HasFulfilledOrder = true;
            }
            return(true);
        }
        return(false);
    }