Exemplo n.º 1
0
    IEnumerator CountStart()
    {
        Controls.disableControls();
        Timer.SetActive(false);
        yield return(new WaitForSeconds(0.5f));

        CountD.GetComponent <Text> ().text = "3";
        GetR.Play();
        CountD.SetActive(true);
        yield return(new WaitForSeconds(1));

        CountD.SetActive(false);
        CountD.GetComponent <Text> ().text = "2";
        GetR.Play();
        CountD.SetActive(true);
        yield return(new WaitForSeconds(1));

        CountD.SetActive(false);
        CountD.GetComponent <Text> ().text = "1";
        GetR.Play();
        CountD.SetActive(true);
        yield return(new WaitForSeconds(1));

        CountD.SetActive(false);
        Go.Play();
        Timer.SetActive(true);
        Controls.enableControls();
    }
Exemplo n.º 2
0
 private void OnTriggerEnter(Collider other)
 {
     texto.text = questions[aleatorio];
     print("tocandome");
     if (other.tag == "Player")
     {
         carCtrl.disableControls();
         Controls.SetActive(false);
         q.SetActive(true);
         a.gameObject.SetActive(true);
         panel.SetActive(true);
     }
 }