Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (answers[aleatorio] == answer.text)
     {
         a.text = "";
         if (carCtrl)
         {
             print("Correcto");
             score.gainPoints();
             Controls.SetActive(true);
             q.SetActive(false);
             a.gameObject.SetActive(false);
             panel.SetActive(false);
             carCtrl.enableControls();
             particle1.SetActive(false);
             Destroy(particle1);
         }
         else
         {
             score.gainPoints();
             carCtrl = FindObjectOfType <CarCtrl>();
             Controls.SetActive(true);
             q.SetActive(false);
             a.gameObject.SetActive(false);
             panel.SetActive(false);
             carCtrl.enableControls();
             particle1.SetActive(false);
         }
         Destroy(gameObject);
     }
     else
     {
     }
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     carCtrl = FindObjectOfType <CarCtrl>();
     //questions = qtFile.text.Split("\n"[0]);
     //answers = ansFile.text.Split("\n"[0]);
     aleatorio = Random.Range(0, questions.Length - 1);
 }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     tc_tc = trackedCar.GetComponent <TrackedCarC> ();
     tc_cc = trackedCar.GetComponent <CarCtrl> ();
 }
Esempio n. 4
0
	// Use this for initialization
	void Start () {
        parrent = GetComponentInParent<CarCtrl>();
	}