using UnityEngine;
using System.Collections;

public class Bullet : MonoBehaviour
{
	public Vector2 velocity = new Vector2(0, -4);
	public float range = 16f;
	public float lifetime = 5f;

	void Start()
	{
		rigidbody2D.velocity = velocity;
	}
	
	void Update()
	{
		Destroy(gameObject, lifetime);
	}

	void OnTriggerEnter2D(Collider2D other)
	{
		if(other.tag == "Enemy")
		{
			Debug.Log("HIT ENEMY");
			//Destroy(gameObject);
		}
	}
}