/// <summary> /// Adds a waypoint before the current destination /// </summary> /// <param name="targetPosition">The target position in world coordinates</param> public void AddWaypointPrev(Vector2 targetPosition) { if (current == null) { WaypointList.AddFirst(targetPosition); } else { WaypointList.AddBefore(current, targetPosition); } }