public override void setDescriptee(GameObject descriptee) { e = descriptee.GetComponent <CultivatePanelElement>().getElement(); Item product = ItemDatabase.findItem(e.getProductId()); name.text = product.getName(); description.text = product.getDescription(); }
public void init(CultivateElement element) { panel = GetComponentInParent <CultivatePanel>(); gm = GameManager.gm; baseObject = gm.getBoardManager().getBase(); this.element = element; name.text = this.element.getItem().getName(); day.text = generateDayText(); product.text = generateProductText(this.element.getItem().getEffect()); icon.sprite = this.element.getItem().getIcon(); }