using UnityEngine;
using System.Collections;

public class Announcer : MonoBehaviour {
    public AudioClip[] singleShift = null;
    public AudioClip[] doubleShift = null;
    public AudioClip[] tripleShift= null;
    public AudioClip[] quadraShift = null;
    public AudioClip[] impressive= null;

    // Use this for initialization
    void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    public void PlaySoundForShift(int s)
    {
        int shiftAmount = Mathf.Abs(s);

        AudioSource src = GetComponent<AudioSource>();
        if (shiftAmount == 0)
        {

        }
        else if (shiftAmount == 1)
        {
            src.clip = singleShift[Random.Range(0, singleShift.Length)];
            src.Play();

        }
        else if (shiftAmount == 2)
        {
            src.clip = doubleShift[Random.Range(0, doubleShift.Length)];
            src.Play();
        }
        else if (shiftAmount == 3)
        {
            src.clip = tripleShift[Random.Range(0, tripleShift.Length)];
            src.Play();
        }
        else if (shiftAmount == 4)
        {
            src.clip = quadraShift[Random.Range(0, quadraShift.Length)];
            src.Play();
        }
    }

    public void PlaySoundForCombo(int c)
    {
        AudioSource src = GetComponent<AudioSource>();
        if (c == 6)
        {
            src.clip = impressive[Random.Range(0, impressive.Length)];
            src.Play();
        }
    }
}
