public virtual void LoadContent(String mapDefFile, ContentManager content) { if (mapDefFile == null) { return; } if (content != null) { TSMapHelper mapHelper = new TSMapHelper(); mapHelper.LoadMapInfo(mapDefFile, content); _numRows = mapHelper.NumRows; _numColumns = mapHelper.NumColumns; _tileWidth = mapHelper.TileWidth; _tileHeight = mapHelper.TileHeight; _tiles = new TSTile[_numRows, _numColumns]; for (int row = 0; row < _numRows; row++) { for (int col = 0; col < _numColumns; col++) { _tiles[row, col] = new TSTile(); _tiles[row, col].Background = mapHelper.TileList[mapHelper.TileMatrix[row, col]]; _tiles[row, col].Type = mapHelper.AccessibleMatrix[row, col]; } } InitAdditionalInfo(); } }
public virtual void LoadContent(String mapDefFile, ContentManager content) { if (mapDefFile == null) return; if (content != null) { TSMapHelper mapHelper = new TSMapHelper(); mapHelper.LoadMapInfo(mapDefFile, content); _numRows = mapHelper.NumRows; _numColumns = mapHelper.NumColumns; _tileWidth = mapHelper.TileWidth; _tileHeight = mapHelper.TileHeight; _tiles = new TSTile[_numRows, _numColumns]; for (int row = 0; row < _numRows; row++) for (int col = 0; col < _numColumns; col++) { _tiles[row, col] = new TSTile(); _tiles[row, col].Background = mapHelper.TileList[mapHelper.TileMatrix[row, col]]; _tiles[row, col].Type = mapHelper.AccessibleMatrix[row, col]; } InitAdditionalInfo(); } }