Esempio n. 1
0
 IEnumerator UpdateTarget()
 {
     while (this.target)
     {
         RequestPathManager.RequestPath(transform.position, target.position, this.OnPathFound);
         yield return(new WaitForSeconds(1));
     }
     yield return(null);
 }
Esempio n. 2
0
 void FixedUpdate()
 {
     if (Input.GetKeyDown("r"))
     {
         this.transform.position = new Vector3(7, 0, 18);
         targetIndex             = 0;
         StopCoroutine("FollowPath");
         RequestPathManager.RequestPath(transform.position, target.position, this.OnPathFound);
     }
 }