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

public class AudioManager : MonoBehaviour
{
    public GameObject manager;
    public List<AudioClip> clips;
    private AudioSource audiosource;

	void Awake ()
    {
        audiosource = gameObject.GetComponent<AudioSource>();
        /*
        audiosource.Stop();
        audiosource.clip = clips[0];
        audiosource.Play();
        */
    }


	void Update ()
    {
		
	}

    public void updateMusic (int n)
    {
        //audiosource = gameObject.GetComponent<AudioSource>();
        audiosource.Stop();
        audiosource.clip = clips[n];
        audiosource.Play();
    }

}
