public override void Update() { if (!isCurrentState || !stateMachineEnabled) { return; } if (!_closeEnough) { _npcLocomotionController.StartMove(); _npcLocomotionController.Move(_target.position); } else { _npcLocomotionController.Stop(); if (CanAttack) { SwitchState(_attackState.GetType()); } } }
public override void Exit() { _locomotionController.Stop(); }