Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public PathFinder(PathFinderManager mgr)
 {
     this.terrain = mgr.TerrainTable;
     this.width   = mgr.Width;
     this.height  = mgr.Height;
     this.units   = mgr.NodeBuffer;
 }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
 public PathFinder(PathFinderManager mgr)
 {
     this.terrain = mgr.TerrainTable;
     this.width = mgr.Width;
     this.height = mgr.Height;
     this.units = mgr.NodeBuffer;
 }