
using UnityEngine;
using System.Collections;

public class Bullet : MonoBehaviour
{
    public GameObject bulletHitEffectPrefab;

    private void OnCollisionEnter(Collision other)
    {
        Destroy(gameObject);
        GameObject effect = Instantiate(bulletHitEffectPrefab, 
            transform.position, transform.rotation) as GameObject;
        Destroy(effect, 1.5f);
    }
}
