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

public class SelfDestroy : MonoBehaviour {
    
    public float lifeTime = 3;

	// Use this for initialization
	void Start () {
		
	}
    float timer = 0;
	// Update is called once per frame
	void Update () {
        timer += Time.deltaTime;
        if (timer>= lifeTime)
        {
            Destroy(gameObject);
        }
	}
}
