using UnityEngine;
using System.Collections;

public class MoveLaser : MonoBehaviour {
	int laserCount = 0;
	int laserLife = 100;

	// Use this for initialization
	void Start () {
		GetComponent<Rigidbody2D> ().AddForce (transform.up * 500);
	}
	
	// Update is called once per frame
	void Update () {
		CheckLife ();
	}

	void CheckLife (){
		laserCount++;
		if (laserCount == laserLife) {
			Destroy (gameObject); 	
		}
	}
}
