Exemplo n.º 1
0
 void OnCollisionEnter2D(Collision2D col)
 {
     if (!col.gameObject.CompareTag("Ground"))
     {
         Destroy(gameObject);
         if (!col.gameObject.CompareTag("Player"))
         {
             Destroy(col.gameObject);
         }
         gameController.AddScore(ScoreValue);
     }
 }