using UnityEngine;
using System.Collections;

public class PlayerSwitch : MonoBehaviour
{

    public GameObject waveBoard;
    public AudioSource _AudioSource;

    public AudioClip _AudioClip1;
    public AudioClip _AudioClip2;

    void Start()
    {

        waveBoard = GameObject.FindGameObjectWithTag("Spawnmanager");

        float waveCount = waveBoard.GetComponent<SpawnManager>().waveCount;


        _AudioSource.clip = _AudioClip1;

        _AudioSource.Play();

    }


    void Update()
    {

  
            if (_AudioSource.clip == _AudioClip1)
            {

                _AudioSource.clip = _AudioClip2;

                _AudioSource.Play();

            }

            else
            {

                _AudioSource.clip = _AudioClip1;

                _AudioSource.Play();

            }

        }

    }


