void OnTriggerExit(Collider other) { validSquad = null; }
void OnTriggerEnter(Collider other) { if (other.tag == "VampirePlayer" || other.tag == "ZombiePlayer") { validSquad = other.GetComponent<SquadMovement>(); Node newTarget = sendNextNode(validSquad.ChangeDirection()); validSquad.changeTarget(newTarget); Debug.Log((int)validSquad.dir); } }