예제 #1
0
 /// <summary>
 /// Removes the last waypoint in the list. Will loop if navmesh is closed.
 /// Throws an InvalidOperationException if empty.
 /// </summary>
 public void RemoveWaypointLast()
 {
     if (!IsEmpty())
     {
         WaypointList.RemoveLast();
         SetNextWaypoint();
     }
     else
     {
         throw new InvalidOperationException("No waypoints in navmesh.");
     }
 }