1.Numbers
2.Upgrade, after upgrading once the cost changes to 0
Code:
using System.Collections;
using UnityEngine;
public class ClickUpgrade : MonoBehaviour {
public Click click;
public UnityEngine.UI.Text itemInfo;
public float cost;
public int count = 0;
public float clickPower;
public string itemName;
private float _newCost;
void Update()
{
itemInfo.text = itemName + "
Cost: " + cost + "
Power: +" + clickPower;
}
public void PurchasedUpgrade()
{
if (click.BTC >= cost)
{
click.BTC -= cost;
count += 1;
click.perclick += clickPower;
cost = Mathf.Round(cost * 2);
_newCost = Mathf.Pow (cost, _newCost = cost);
}
}
}