override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (_playerController != null) { _playerController.SwitchState <NormalState>(); _playerMotor.HasGravity = true; _animationsController.Climb(false); animator.applyRootMotion = false; _playerController = null; } if (_enemyMotor != null) { _enemyMotor.RigidBody.isKinematic = true; _enemyMotor.ResetRigidbodyConstraints(); _enemyMotor.UpdateTransformToNavmesh = true; _enemyMotor.Warp(_enemyMotor.transform.position); _animationsController.Climb(false); animator.applyRootMotion = false; _enemyBehaviour.StopMovementAction(); _enemyMotor = null; } }