public void RequestStoreItem(Stock storeItem) { requestedItem = storeItem.item; name = requestedItem.obj.name; basePrice = requestedItem.value; quantity = 1; }
public Stock(RectTransform template, string parentName, Itemsss item) { this.itemPanel = Instantiate<RectTransform>(template); itemPanel.SetParent(GameObject.Find(parentName).transform); itemPanel.localScale = Vector3.one; this.item = item; this.iconDisplay = itemPanel.FindChild("Icon").GetComponent<Image>(); this.nameDisplay = itemPanel.FindChild("Name").GetComponent<Text>(); this.valueDisplay = itemPanel.FindChild("Value").GetComponent<Text>(); this.nameDisplay.text = item.obj.name; this.valueDisplay.text = item.value.ToString(); }