using UnityEngine;
using System.Collections;

public class SFX : MonoBehaviour 
{

    private AudioSource audioSource;
	public AudioClip chant1, chant2, goats, rooster, farm, scream1, scream2, wheat, well, music;

    void Start() 
    {
        audioSource = GetComponent<AudioSource>();
    }

    public void play_sfx(string fx)
    {
        if (fx == "chant1") 
        {
            audioSource.PlayOneShot(chant1, 0.7F);
        }
        if (fx == "chant2")
        {
            audioSource.PlayOneShot(chant2, 0.7F);
        }
        if (fx == "goats")
        {
            audioSource.PlayOneShot(goats, 0.7F);
        }
        if (fx == "rooster")
        {
            audioSource.PlayOneShot(rooster, 0.7F);
        }
        if (fx == "scream1")
        {
            audioSource.PlayOneShot(scream1, 0.7F);
        }
        if (fx == "scream2")
        {
            audioSource.PlayOneShot(scream2, 0.7F);
        }
        if (fx == "farm")
        {
            audioSource.PlayOneShot(farm, 0.7F);
        }
        if (fx == "well")
        {
            audioSource.PlayOneShot(well, 0.7F);
        }
        if (fx == "wheat")
        {
            audioSource.PlayOneShot(wheat, 0.4F);
        }
		if (fx == "music") {
			audioSource.PlayOneShot(music, 0.4F);
		}
    }
}
