using UnityEngine;
using System.Collections;

public class DetermineWinner : MonoBehaviour {
	GameManager gameManager;
	public int inewCameraSet;
	public bool bFox, bSquirrel;

	public AudioSource crashSnd;
	public AudioSource patitoSnd;
	public AudioSource baseballSnd;
	
	// Use this for initialization
	void Start () {
		gameManager = GameObject.Find ("GameManager").GetComponent<GameManager>();
	}
	
	// Update is called once per frame
	void Update () {
		
	}
	void OnTriggerEnter(Collider other) 
	{
		if(other.tag == "Car")
		{
			if (bFox == false)
			{
				gameManager.bSquirrelWin = true;
				crashSnd.Play();
			} else
			{
				//patitoSnd.Play();
				baseballSnd.Play();
				gameManager.bFoxWin = true;

			} 
		}	
	}
	
}
