Hello , ive made car selection screen, i can switch next and back working great.
i have coins.
i made buy button to appear on specific index of car . working nice
on button click i enable map so player playes that map, but when i turn to next car, map remains enabled. how can i arrange this, i cant go to logic how it works
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ManqanisYidva : MonoBehaviour
{
DriftManager manager;
// Update is called once per frame
void Start()
{
manager = GameObject.FindObjectOfType<DriftManager>();
}
public GameObject Map;
//M3
public GameObject m3Button;
bool nayidiaBMW=false;
public void Update()
{
if (nayidiaBMW == false)
{
Map.SetActive(false);
}
else if(nayidiaBMW == true)
{
Map.SetActive(true);
}
}
public void M3YIDVA()
{
if((manager.totalDriftScore - 1400) >= 0)
{
manager.totalDriftScore = manager.totalDriftScore - 1400;
nayidiaBMW = true;
m3Button.SetActive(false);
}
else if(((manager.totalDriftScore - 1400) < 0))
{
Debug.Log("CANT BUY THIS CAR");
}
}
}
i know i have to make it in update but…