Esempio n. 1
0
 //void OnCollisionEnter(Collision hit)
 //{
 //    Debug.Log("asdasdasd");
 //    Destroy(gameObject);
 //}
 void OnControllerColliderHit(ControllerColliderHit hit)
 {
     if (hit.gameObject.tag == "Enemy")
     {
         NewBehaviourScript weq = hit.gameObject.GetComponent <NewBehaviourScript>();
         weq.GetBullet(this);
     }
     Destroy(gameObject);
 }