Example #1
0
 void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.CompareTag("Enemy"))
     {
         Destroy(collision.gameObject);
         Destroy(this.gameObject);
         AddScore.addScore();
     }
 }