public void Start() { //Get a reference to the Seeker component we added earlier seeker = GetComponent <Seeker>(); //Start a new path to the targetPosition, return the result to the OnPathComplete function seeker.StartPath(transform.position, target.position, OnPathComplete); tr = transform; Repath(); fc = this.GetComponent <ForceCalculation>(); }
public void Start () { //Get a reference to the Seeker component we added earlier seeker = GetComponent<Seeker>(); //Start a new path to the targetPosition, return the result to the OnPathComplete function seeker.StartPath (transform.position,target.position, OnPathComplete); tr=transform; Repath (); fc = this.GetComponent<ForceCalculation>(); }