using UnityEngine;
using System.Collections;

[RequireComponent(typeof(AudioSource))]

public class RemoveAfterSoundEnd : MonoBehaviour {

    private AudioSource _audioSource;
	void Start () {
        _audioSource = GetComponent<AudioSource>();
	}
	
	void Update () {
        if (!_audioSource.isPlaying)
            Destroy(gameObject);
	}
}
