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

public class FaceOuch : MonoBehaviour {
	public List<AudioClip> AudioClipList;
	private AudioSource audioSource;
	void Start () {
		audioSource = gameObject.GetComponent<AudioSource>();
	}
	
	float nextSoundStartTime;
	
	void OnCollisionEnter(Collision collision)
    {
		playSound();
	}
	void playSound(){
		audioSource.clip = AudioClipList[Random.Range(0, AudioClipList.Count)];
		audioSource.Play();
	}
}
