using UnityEngine;
using System.Collections;

public class SoundManager : MonoBehaviour 
{

	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(GUIManager.clicClic) //quand on clique sur les GUI boutons
		{
			AudioClip clicSound = (AudioClip) Resources.Load("Sounds/Clic", typeof(AudioClip));
			audio.PlayOneShot(clicSound);
			GUIManager.clicClic = false;
		}
		if(BoatManager.deadBoat)//Quand un bateau est mort
		{
			AudioClip explosionSound = (AudioClip) Resources.Load("Sounds/Explosion", typeof(AudioClip));
			audio.PlayOneShot(explosionSound);
			BoatManager.deadBoat = false;
		}
	}
}
