Ejemplo n.º 1
0
        public AreaMap(ref AreaMapTemplate template)
        {
            rand = new Random();

            widthTiles  = template.mapWidthTile;
            heightTiles = template.mapHeightTile;

            xRange = new Point(0, widthTiles);
            yRange = new Point(0, heightTiles);

            InitializeLists();

            LoadTemplate(ref template);

            MSGrid = new MapSquare[heightTiles][];

            for (int row = 0; row < heightTiles; row++)
            {
                MSGrid[row] = new MapSquare[widthTiles];

                for (int column = 0; column < widthTiles; column++)
                {
                    MSGrid[row][column] = new MapSquare(column, row);
                }
            }
        }
Ejemplo n.º 2
0
        private void LoadTemplate(ref AreaMapTemplate template)
        {
            areaMapType = template.mapType;

            //widthTiles = template.mapWidthTile;
            //heightTiles = template.mapHeightTile;
            //mapAreaTiles = widthTiles * heightTiles;
        }