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);
     }
 }
 private void Awake()
 {
     instance    = this;
     pathfinding = GetComponent <Pathfinding>();
 }
 void Awake()
 {
     instance    = this;
     pathFinding = this.GetComponent <PathFinding>();
 }
Esempio n. 5
0
 private void Awake()
 {
     grid = GetComponent <Grid>();
     this.requestManager = GetComponent <RequestPathManager>();
 }