public override void MakeUpgrade(UpgradeItemModel model) { if (DataManager.data.MoneyByClick < 3000) { DataManager.data.MoneyByClick += model.value; model.UpgradePrice(); } }
//public ActionType tipo { get { return ActionType.CLICKUPGRADE; } } //Method for update UI public void UpdateUI(UpgradeItemModel model) { iconImage.sprite = model.icon; nameText.text = model.upgradeName; descriptionText.text = model.description + ": " + model.value + "$"; priceText.text = ":" + UIManager.IntParseToString(model.priceData.price) + "$"; if (DataManager.data.Money >= model.priceData.price) { CanBuy(true); } else { CanBuy(false); } UpdateUI(); }
//abstract method that children will implement so they can make different things with the same base public abstract void MakeUpgrade(UpgradeItemModel model);