private void Awake() { _image = GetComponentInChildren <Image>(); _button = GetComponentInChildren <Button>(); _button.onClick.AddListener(OnButtonClick); _upgradeTab = GameObject.FindGameObjectWithTag("UpgradeTab").GetComponent <UpgradeTab>(); }
private void OnButtonClick() { UpgradeTab.UpdateButtonClicked(Cultivation); }