Exemplo n.º 1
0
 void OnCollisionEnter(Collision col)
 {
     if (!col.gameObject.name.Contains("Wall"))
     {
         col.gameObject.GetComponent <Rigidbody>().AddForce(transform.forward * 300);
         shootEnemy.launchParticle(transform.position);
     }
     Destroy(gameObject);
 }