public PathFinder(Map map) { this.map = map; this.mapSizeX = map.Size.x; this.mapSizeZ = map.Size.z; this.calcGrid = new PathFinder.PathFinderNodeFast[this.mapSizeX * this.mapSizeZ]; this.openList = new FastPriorityQueue <PathFinder.CostNode>(new PathFinder.CostNodeComparer()); this.regionCostCalculator = new RegionCostCalculatorWrapper(map); }
public PathFinder(Map map) { this.map = map; IntVec3 size = map.Size; mapSizeX = size.x; IntVec3 size2 = map.Size; mapSizeZ = size2.z; calcGrid = new PathFinderNodeFast[mapSizeX * mapSizeZ]; openList = new FastPriorityQueue <CostNode>(new CostNodeComparer()); regionCostCalculator = new RegionCostCalculatorWrapper(map); }
public PathFinder(Map map) { this.map = map; mapSizeX = map.Size.x; mapSizeZ = map.Size.z; int num = mapSizeX * mapSizeZ; if (calcGrid == null || calcGrid.Length < num) { calcGrid = new PathFinderNodeFast[num]; } openList = new FastPriorityQueue <CostNode>(new CostNodeComparer()); regionCostCalculator = new RegionCostCalculatorWrapper(map); }