private void InstatiateMapData() { Tiles = new SCTile[Map.Tiles.GetLength(0), Map.Tiles.GetLength(1)]; Array.Copy(Map.Tiles, Tiles, Map.Tiles.Length); PointsOfInterest = Map.PointsOfInterest.Select(p => p.Clone()).ToList(); }
private void ProcessTiles() { Tiles = new SCTile[Size, Size]; for (int x = 0; x < Size; x++) { for (int y = 0; y < Size; y++) { //The map is organized the other way around. I don't care about the cache inefficiency here. My sanity comes first. var tileId = map[y, x]; var tileDef = tileSet.Tiles[tileId]; Tiles[x, y] = new SCTile(tileDef.BitFlags); ProcessSpecialTileProps(x, y, tileId, tileDef); } } }