public void DebugBuyMarble()
    {
        InventoryItem marbleToSell = GameObject.Find("InventoryItemController").GetComponent <InventoryItemController>().itemTypes.Find(x => x.itemName == "Marble");

        shipInventory.PayDucats(Mathf.RoundToInt(marbleToSell.baseValue));
        shipInventory.AddItemToInventory(marbleToSell);
    }
Exemple #2
0
 public void SellItemToPlayer()
 {
     if (playerInventory.CheckAffordability((int)itemForSale.price))
     {
         playerInventory.AddItemToInventory(itemForSale.item);
         playerInventory.PayDucats((int)itemForSale.price);
     }
 }