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

public class DestroyedWaveScript : MonoBehaviour {

	private AudioSource audioPl;

	// Use this for initialization
	void Start () {
		audioPl = this.gameObject.GetComponent<AudioSource> ();
		audioPl.Play ();
	}
	
	// Update is called once per frame
	void Update () {
		if (!audioPl.isPlaying) {
			Destroy (this.gameObject);
		}
	}
}
