Beispiel #1
0
 public void Buy()
 {
     _count++;
     CountText.text = _count.ToString();
     playerAge.Substract(_itemData.value);
     playerIncome.Add(_itemData.incomingRate);
     playerCosts.Add(_itemData.outgoingRate);
     SellButton.interactable = true;
 }
Beispiel #2
0
    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;
    }