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

public class SoundEffects : MonoBehaviour {
	public AudioClip SoundEffect;
	public AudioClip SoundEffectPress;
	public AudioClip SoundEffectRelease;

    private AudioSource source;
    private float volLowRange = .5f;
    private float volHighRange = 1.0f;
	// Use this for initialization
	void Start () {
		source = GetComponent<AudioSource>();
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	public void PlaySound() {
		float vol = Random.Range (volLowRange, volHighRange);
		source.PlayOneShot(SoundEffect, vol);
	}

	public void PlayPress() {
		float vol = Random.Range (volLowRange, volHighRange);
		source.PlayOneShot(SoundEffectPress, vol);
	}

	public void PlayRelease() {
		float vol = Random.Range (volLowRange, volHighRange);
		source.PlayOneShot(SoundEffectRelease, vol);
	}
}
