Example #1
0
 void OnCollisionEnter(Collision other)
 {
     if (other.gameObject.tag == "Obstacle")
     {
         Destroy(other.gameObject);
         Destroy(gameObject);
         score.AddBonusPoints();
     }
 }