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