Question by
Eviljoako · Jan 12, 2017 at 05:57 PM ·
scripting problemscript.codepage
Code error :/
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 + "\nCost :" + cost + "\nPower: +" + 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
Comment
Your answer
Follow this Question
Related Questions
need help with simple timing code 1 Answer
Scripting Help desperately needed. 1 Answer
Call animation only once? 1 Answer
Problem with the cloning object :( 0 Answers
Audio Fade With Toggle 1 Answer