public void Buy() { _count++; CountText.text = _count.ToString(); playerAge.Substract(_itemData.value); playerIncome.Add(_itemData.incomingRate); playerCosts.Add(_itemData.outgoingRate); SellButton.interactable = true; }
public void Sell() { if (_count < 1) { return; } playerAge.Add(_itemData.value); playerIncome.Substract(_itemData.incomingRate); playerCosts.Substract(_itemData.outgoingRate); _count--; CountText.text = _count.ToString(); SellButton.interactable = _count > 0; }