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

public class DestroyInTime : MonoBehaviour
{
    public float TimeToDestroy = 6.0f;

    // Update is called once per frame
    void Update()
    {
        TimeToDestroy -= Time.deltaTime;
        if(TimeToDestroy <= 0)
        {
            Destroy(this.gameObject);
        }
    }
}
