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

public class PlayOnceThenDestroy : MonoBehaviour {
    AudioSource audio;
	// Use this for initialization
	void Start () {
        audio = this.GetComponent<AudioSource>();
        audio.loop = false;
        audio.Play();
	}
	
	// Update is called once per frame
	void Update () {
        if (!audio.isPlaying)
        {
            Destroy(this.gameObject);
        }
	}
}
