예제 #1
0
    public void Update()
    {
        // Navigate
        if (!navAgent.pathPending && navAgent.remainingDistance < 0.5f)
        {
            GotoPoint(route.GetNextPoint(point));
        }

        // Detect
    }
 public void Enter()
 {
     _index = _route.CycleIndex(_index);
     _navAgent.SetDestination(_route.GetNextPoint(_index));
     _navAgent.stoppingDistance = 0.5f;
 }