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

function Start () {
	_count = 0;
}

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

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

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

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