Ejemplo n.º 1
0
 //detecta se a caixa eta no lugar correto.
 void OnCollisionEnter2D(Collision2D objeto)
 {
     if (objeto.gameObject.tag == "Box")
     {
         Cursor.visible = true;            //mostra o mouse
         Time.timeScale = 0;
         victory        = 1;
         ApplicationController.AddToRanking(tempo);
         Debug.Log("Bateu!");
         gameObject.GetComponent <AudioSource>().Play();
     }
 }