As part of a project for the school I am trying to create an Idle / Clicker game, (With Unity) and I am learning the most basic programming, I am studying and that, but as I have not had much time , because I am being guided by a video of a type on the internet.
I'm just starting to create the interface and the buttons, but I've been docked in something fundamental and that will surely be very simple so I have 2 Scripts one to control the "gold" and one to control the improvements, with which You can earn more gold.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Click {
public UnityEngine.UI.Text goldDisplay;
public int gold = 0;
public int goldperclick = 1;
void Update() {
goldDisplay.text = "Gold: " + gold;
}
public void Clicked () {
gold += goldperclick;
}
}
I do not know why it came out that way but well, that's the first script
And then
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UpgradeManager {
public Click click;
}
Here does not detect the "Click" when I put public