예제 #1
0
파일: PathSearch.cs 프로젝트: pdovy/OpenRA
        public static PathSearch FromPoint( World world, MobileInfo mi, int2 from, int2 target, bool checkForBlocked )
        {
            var search = new PathSearch(world, mi) {
                heuristic = DefaultEstimator( target ),
                checkForBlocked = checkForBlocked };

            search.AddInitialCell( world, from );
            return search;
        }
예제 #2
0
        public static PathSearch FromPoint( Actor self, int2 from, int2 target, bool checkForBlocked )
        {
            var search = new PathSearch(self) {
                heuristic = DefaultEstimator( target ),
                checkForBlocked = checkForBlocked };

            search.AddInitialCell( self.World, from );
            return search;
        }
예제 #3
0
파일: PathSearch.cs 프로젝트: pdovy/OpenRA
        public static PathSearch FromPoints(World world, MobileInfo mi, IEnumerable<int2> froms, int2 target, bool checkForBlocked)
        {
            var search = new PathSearch(world, mi)
            {
                heuristic = DefaultEstimator(target),
                checkForBlocked = checkForBlocked
            };

            foreach (var sl in froms)
                search.AddInitialCell(world, sl);

            return search;
        }
예제 #4
0
        public static PathSearch FromPoint( World world, int2 from, int2 target, UnitMovementType umt, bool checkForBlocked )
        {
            var search = new PathSearch(world) {
                heuristic = DefaultEstimator( target ),
                umt = umt,
                checkForBlocked = checkForBlocked };

            search.AddInitialCell( world, from );
            return search;
        }