using UnityEngine;
using System.Collections;

public class LimitedLifetime : MonoBehaviour
{
    public float timeToLive;

	void Update () 
    {
        timeToLive -= Time.deltaTime;
        if(timeToLive <= 0f)
        {
            Destroy(gameObject);
        }
	}
}
