using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BulletBehavior : MonoBehaviour {

    public int speed = 6;
    Rigidbody2D rb2d;

	// Use this for initialization
	void Start () {
        rb2d = gameObject.GetComponent<Rigidbody2D>();
        rb2d.AddForce(Vector3.forward, ForceMode2D.Force);
    }
	
	// Update is called once per frame
	void OnBecameInvisible() {
        Destroy(gameObject);
	}

}
