using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class itembuy : MonoBehaviour
{
public click click;
public UnityEngine.UI.Text itemInfo;
public float cost;
public int count = 0;
public int clickPower;
public string itemName;
private float _newCost;
void Update()
{
itemInfo.text = itemName + "
Cost :" + cost + "
Power: +" + clickPower;
}
public void PurchasedUpgrade()
{
if (click.ki >= cost)
{
click.ki -= cost;
count += 1;
click.kiperclick += clickPower;
cost = Mathf.Round(cost * 1.15f);
_newCost = Mathf.Pow(cost, _newCost = cost);
}
}
}
idk whats wrong