Пример #1
0
 private void GoToNextPoint()
 {
     if (pathQueue.Count > 0)
     {
         Ap -= 1;
         Vector3 aim = pathQueue.Pop();
         NavAgent.SetDestination(aim);
         NavMeshPath path = new NavMeshPath();
         NavAgent.CalculatePath(aim, path);
         Controller.Walk(true);
     }
     else
     {
         NavAgent.ResetPath();
         Controller.Walk(false);
     }
 }