Ejemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("CubeMain"))
     {
         if (index > 3)
         {
             mainCube.Lose();
         }
     }
 }
Ejemplo n.º 2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("CubeMain") || other.CompareTag("CubePlus"))
     {
         mainCube.Lose();
     }
     else
     if (other.CompareTag("Enemy"))
     {
         Destroy(other);
     }
 }