/// <summary> /// Raises the trigger exit2 d event. /// </summary> /// <param name="other">Other.</param> void OnTriggerExit2D(Collider2D other) { if (other.CompareTag(tagCheck)) { Avatar player = other.gameObject.GetComponent <Avatar> (); if (player != null) { player.AllowMovement(lockedMovementVector); } } }