public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { base.OnStateUpdate(animator, stateInfo, layerIndex); if (!_movement.IsMoving()) { _movement.target = GetFoodPos(); } _movement.LookAtTarget(); _movement.Move(); }
public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { _movement.Move(); _movement.LookAtTarget(); }