using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bullet : MonoBehaviour
{
public float speed;
public Player_Controller player;
public void Update()
{
transform.Translate(Vector3.right * Time.deltaTime * speed);
}
private void OnTriggerEnter2D (Collider2D other)
{
AddToPool();
}
void AddToPool ()
{
player.AddBulletToPool(this);
}
}