예제 #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;
 }