#pragma strict
var faceManager : GameObject;
private var _count : int;

function Start () {
	_count = 0;
}

function Update () {
	//Debug.Log("Warning Left: " + _count);
	if (_count > 0)
	{
		faceManager.SendMessage ("ActivateOKLeft");

	}
	else
	{
		faceManager.SendMessage ("DeactivateOKLeft");
	}
	_count = 0;
}

function OnTriggerStay(other: Collider)
{
	if (other != null)
	{
		if (other.CompareTag("Track"))
		{
			++ _count;
		}
	}
}
/*
function OnTriggerEnter(collider: Collider)
{
	++_count;
	Debug.Log("Left Warning Triggered: " + _count);
	faceManager.SendMessage ("ActivateOKLeft");
}

function OnTriggerExit(other: Collider)
{
	--_count;
	Debug.Log("Left Warning Removed: " + _count);
	if (_count == 0)
	{
		faceManager.SendMessage ("DeactivateOKLeft");
	}
}
*/