Ejemplo 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
     {
     }
 }
Ejemplo 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);
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     tc_tc = trackedCar.GetComponent <TrackedCarC> ();
     tc_cc = trackedCar.GetComponent <CarCtrl> ();
 }
Ejemplo n.º 4
0
	// Use this for initialization
	void Start () {
        parrent = GetComponentInParent<CarCtrl>();
	}