Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }
Exemple #3
0
        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;
        }