public class IncreaseMyGold : MonoBehaviour
{
public UILabel label; // <-- set this in inspector
public int myGold = 0;
public int goldAmount;
void Start () { label.text = myGold.ToString(); }
void OnClick ()
{
if (goldAmount == 1) {
myGold += 10;
label.text = myGold.ToString ();
} else if (goldAmount == 2) {
myGold += 100;
label.text = myGold.ToString ();
}
}
}