using UnityEngine;
using System.Collections;

public class SelfDestruct : MonoBehaviour {

    public float secondsLeft;

	void Start () {
        StartCoroutine(WaitAndDestroy());
	}

    private IEnumerator WaitAndDestroy()
    {
        yield return new WaitForSeconds(secondsLeft);
        Destroy(gameObject);
    }
}
