using UnityEngine;
using System.Collections;

public class BulletCtrl : MonoBehaviour {

	public float speed = 0.4f;
	public float lifeTime = 10;

	Transform _transform;

	// Use this for initialization
	void Start () {
		_transform = transform;
	}
	
	// Update is called once per frame
	void Update () {
		_transform.position += _transform.right * speed * Time.deltaTime;
		if(lifeTime>0){
			lifeTime-= Time.deltaTime;
			if(lifeTime<=0){
				Destroy(gameObject);
			}
		}
	}



}
