public Map(BattleField region) { this.region = region; FileLocation fl = FileSystem.Instance.Locate("grad.bit", GameFileLocs.Nature); gradMap = new BitTable(32); gradMap.Load(fl); pathFinder = new PathFinderManager(gradMap); fl = FileSystem.Instance.Locate("mapheight.raw", GameFileLocs.Nature); heightData = new ushort[HeightMapHeight][]; ContentBinaryReader br = new ContentBinaryReader(fl); for (int i = 0; i < HeightMapHeight; i++) { heightData[i] = new ushort[HeightMapWidth]; for (int j = 0; j < HeightMapWidth; j++) { heightData[i][j] = br.ReadUInt16(); } } br.Close(); }
public PathFinder(PathFinderManager mgr) { this.terrain = mgr.TerrainTable; this.width = mgr.Width; this.height = mgr.Height; this.units = mgr.NodeBuffer; }