public void OnTriggerExit(Collider other) { if (_enemyBehaviour.Health > 0 && other.gameObject.CompareTag("Ladder")) { _transform.gameObject.layer = LayerMask.NameToLayer("NoCollisions"); _animationsController.ClimbTopLadder(); } }
public override void OnTriggerExit(Collider other) { if (_playerController.Health > 0 && other.gameObject.CompareTag("Ladder") && !_physicsController.IsGrounded) { int mask = LayerMask.NameToLayer("NoCollisions"); _playerTransform.gameObject.layer = mask; _physicsController.IsGroundedChecker.gameObject.layer = mask; _animationsController.ClimbTopLadder(); } }