using System.Collections; using System.Collections.Generic; using UnityEngine; public class Bullet : MonoBehaviour { /// /// This is to destroy the bulet object when it collides with other items /// /// private void OnCollisionEnter2D(Collision2D collision) { //bestroy the bullet Destroy(gameObject); } }