예제 #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> ();
    }
예제 #2
0
파일: Player.cs 프로젝트: Linkaan/LD40
    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> ();
    }