Esempio n. 1
0
        public void SellItem(Item i)
        {
            //If at a shop, we have the item, and the shop can afford/will be able to resell it
            if (currentShop && inventory.HasNumberOfItem(i, 1) && currentShop.TryBuyFromPlayer(i))
            {
                inventory.RemoveFromInventory(i, 1);

                wallet.AddMoney(i.GetPrice());
            }
        }
Esempio n. 2
0
        public override UnityAction Action(Item i, int n, object inventory)
        {
            return(new UnityAction(delegate
            {
                Inventory inv = inventory as Inventory;

                inv.RemoveFromInventory(i, n);

                i.DoItemStuff();
            }));
        }