using UnityEngine;
using System.Collections;

public class s_Buttons : MonoBehaviour
{
	public AudioClip buttonSound;
	
	public void Clicked()
	{	
		AudioManager.PlaySound(buttonSound);
		renderer.material.color = new Color(0.5f, 0.75f, 0.75f);
		
		StartCoroutine(ColorBack());
	}
	
	IEnumerator ColorBack()
	{
		yield return new WaitForSeconds(buttonSound.length);
		
		renderer.material.color = Color.white;
	}
}
