using UnityEngine;
using System.Collections;

public class KillOnSoundEnd : MonoBehaviour {

	// Use this for initialization
	void Start () {
        if (!audio)
        {
            Destroy(this);
        }
	}
	
	// Update is called once per frame
	void Update () {
        if (!audio.isPlaying)
        {
            Destroy(this.gameObject);
        }
	}
}
