using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class Bullet : MonoBehaviour
{
    public Vector2 direction;
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        transform.Translate(direction * 5.0f * Time.deltaTime);
    }
    
    //カメラの外に出た場合
    void OnBecameInvisible()
    {
        Destroy(gameObject);
    }
}
