public override void Enter() { _wayPointIndex = 0; _locomotionController.StartMove(); _locomotionController.Move(_wayPoints[_wayPointIndex].position); }
public override void Update() { if (!isCurrentState || !stateMachineEnabled) { return; } if (!_closeEnough) { _npcLocomotionController.StartMove(); _npcLocomotionController.Move(_target.position); } else { _npcLocomotionController.Stop(); if (CanAttack) { SwitchState(_attackState.GetType()); } } }