using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class DeactivateDistanceSlider : MonoBehaviour {
	public GameObject goSlider, goSpritesAD, goSpritesLR;
	void OnTriggerEnter (Collider other) 
	{
		if (other.tag == "Car" || goSlider.GetComponent<Distance>().fDistance < goSlider.GetComponent<Slider>().minValue)
		{
			goSlider.SetActive(false);
			goSpritesAD.SetActive(false);
			goSpritesLR.SetActive(false);
		}
	}
}
