protected virtual void OnTriggerEnter2D (Collider2D other)
{
if (other.tag == "Player")
{
playerInRange = true;
if( getPlayer() == null )
return;
PossessableTree script = getPlayer ().GetComponent<PossessableTree> ();
if (script != null && script.Eating)
{
panic ();
}
}
if (other.tag == "Border")
{
// Only ignore collisions with the border if the NPC has not entered the map yet
if (!enteredMap || killSelf || panicked)
{
ignoreBorder (true, other);
}
}
}