Ejemplo n.º 1
0
    void Start()
    {
        pathShower              = GetComponent <ShowPath> ();
        agent                   = GetComponent <NavMeshAgent> ();
        agent.enabled           = false;
        startDestination        = destMgr.nextDestination();
        this.transform.position = startDestination.transform.position;
        currentDestination      = destMgr.nextDestination();
        hasInitiated            = false;
        agentPriority           = 0;

        waypoints = new List <Waypoint> ();
    }
Ejemplo n.º 2
0
    void Start()
    {
        pathShower              = GetComponent <ShowPath> ();
        agent                   = GetComponent <NavMeshAgent> ();
        agent.enabled           = false;
        startDestination        = destMgr.nextDestination();
        this.transform.position = startDestination.transform.position;
        currentDestination      = destMgr.nextDestination();
        hasInitialized          = false;
        agentPriority           = 0;

        startTime = Time.time;

        //agent.updatePosition = false;
        agent.updateRotation   = false;
        agent.stoppingDistance = 2f;

        waypoints = new List <Waypoint> ();
    }