public PathFinder(List <WayPoint> wayPoints, bool insideSubmarine = false) { nodes = PathNode.GenerateNodes(wayPoints.FindAll(w => w.MoveWithLevel != insideSubmarine)); foreach (WayPoint wp in wayPoints) { wp.linkedTo.CollectionChanged += WaypointLinksChanged; } this.insideSubmarine = insideSubmarine; }
public PathFinder(List <WayPoint> wayPoints, bool indoorsSteering = false) { nodes = PathNode.GenerateNodes(wayPoints.FindAll(w => w.Submarine != null == indoorsSteering)); foreach (WayPoint wp in wayPoints) { wp.linkedTo.CollectionChanged += WaypointLinksChanged; } IndoorsSteering = indoorsSteering; }
public PathFinder(List <WayPoint> wayPoints, bool isCharacter) { var filtered = isCharacter ? wayPoints : wayPoints.FindAll(w => w.Submarine == null); nodes = PathNode.GenerateNodes(filtered, removeOrphans: true); foreach (WayPoint wp in wayPoints) { wp.OnLinksChanged += WaypointLinksChanged; } this.isCharacter = isCharacter; }