I have no clue why this isn’t working. The shop is active when I start play mode. I’m steaming this and no one has any clue. I saved it too, forgot to save for the photo still isn’t working
int points;
public Text PointsCounter;
public GameObject doggo;
public GameObject Shop;
private bool HasBeenActive;
private int WorkerLvl = 0;
int pointsperclick = 1;
int pointspersecond = 0;
int WorkerCost;
int DblMoneyCost;
void Start()
{
doggo.transform.Translate(0, 0, -1);
points = 0;
HasBeenActive = false;
Shop.SetActive(false);
}
public void WorkerBtn()
{
WorkerLvl += 1;
}
void Update()
{
PointsCounter.text = points.ToString();
Debug.Log (points);
// Button if statements.
if (WorkerLvl >= 1)
{
points += pointspersecond;
if (WorkerLvl == 1)
{
pointspersecond = 1;
}
}
if (Input.GetKeyDown(KeyCode.Mouse0))
{
transform.localScale += new Vector3(-0.1f, -0.1f, 0);
points += pointsperclick;
}
if (Input.GetKeyUp(KeyCode.Mouse0))
{
transform.localScale += new Vector3(0.1f, 0.1f, 0);
}
if (points >= 100 && HasBeenActive == false);
{
Shop.SetActive(true);
HasBeenActive = true;
}
if (HasBeenActive == true)
{
Shop.SetActive(true);
}
}
}