示例#1
0
文件: Map.cs 项目: yuri410/lrvbsvnicg
        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();
        }
示例#2
0
 public PathFinder(PathFinderManager mgr)
 {
     this.terrain = mgr.TerrainTable;
     this.width   = mgr.Width;
     this.height  = mgr.Height;
     this.units   = mgr.NodeBuffer;
 }
示例#3
0
文件: Map.cs 项目: yuri410/lrvbsvnicg
        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();
        }
示例#4
0
 public PathFinder(PathFinderManager mgr)
 {
     this.terrain = mgr.TerrainTable;
     this.width = mgr.Width;
     this.height = mgr.Height;
     this.units = mgr.NodeBuffer;
 }