Пример #1
0
 void OnCollisionEnter2D(Collision2D other)
 {
     if (other.gameObject.CompareTag("ball"))
     {
         Destroy(gameObject);
         UI_Manager.Instance().AddScore_Green();
     }
 }
Пример #2
0
 void OnCollisionEnter2D(Collision2D other)
 {
     if (other.gameObject.CompareTag("ball"))
     {
         bloc_gris -= 1;
         if (bloc_gris <= 0)
         {
             Destroy(gameObject);
             UI_Manager.Instance().AddScore_Gris();
         }
     }
 }