Esempio n. 1
0
    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>();
    }
Esempio n. 2
0
	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>();
	}