using System.Collections;
public class BulletControl : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnCollisionEnter(Collision col){
if (col.gameObject.CompareTag ("enemy")) {
Destroy (col.gameObject);
Destroy (gameObject);
}
}
void OnTriggerEnter(){
Destroy (gameObject);
}
}
No hay comentarios:
Publicar un comentario