Пример #1
0
 IEnumerator TravelToRoutine(TravelTo travelToNode)
 {
     while(true){
         //Debug.Log (gameObject);
         //Debug.Log (nav.destination);
         //Debug.Log (transform.position);
         if(nav.remainingDistance > nav.stoppingDistance || nav.pathPending){
             yield return null;
         }
         else{
             travelToNode.ReceiveStatus(Node.Status.Success);
             break;
         }
     }
 }
Пример #2
0
 //--------------------------------------------------------
 public void TravelTo(Vector3 destination, TravelTo travelToNode)
 {
     nav.SetDestination(destination);
     nav.Resume();
     StartCoroutine("TravelToRoutine", travelToNode);
 }