예제 #1
0
파일: Unit.cs 프로젝트: dhuntley/realm
 public void HandleMoveRequest(Vector2Int targetCell, UnityAction onArrive = null, OnBlockedAction onBlocked = null)
 {
     StopAllRequests();
     if (navAgent.SetDestination(targetCell))
     {
         onArriveAction  = onArrive;
         onBlockedAction = onBlocked;
         isMoving        = true;
         unitIsBlocked   = false;
         hasNextPosition = false;
     }
     else
     {
         navAgent.ClearPath();
     }
 }