public void setCurrentItem(shopItemsScript.shopItem i) { currentItem = i; if (i != null) { itemName.text = currentItem.listName; itemDescription.text = currentItem.description; itemPrice.text = currentItem.price.ToString(); } else { itemName.text = "nothing"; itemDescription.text = ""; itemPrice.text = "0"; } }
public void setItem(shopItemsScript.shopItem i) { item = i; img.sprite = i.sprite; }