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); } } }
private void LoadTemplate(ref AreaMapTemplate template) { areaMapType = template.mapType; //widthTiles = template.mapWidthTile; //heightTiles = template.mapHeightTile; //mapAreaTiles = widthTiles * heightTiles; }