public void CopyFromRemote(WorldMap remoteMap, WorldMap mainMap) { if (remoteMap == null) { Debug.Log("Didn't get world map!"); return; } width = remoteMap.world_width; height = remoteMap.world_height; worldNameEnglish = remoteMap.name_english; embarkTileOffset = new Vector3((remoteMap.map_x * 16), 0, -(remoteMap.map_y * 16)); regionOrigin = new DFCoord(remoteMap.map_x * 16, remoteMap.map_y * 16, 0); SetPosition(mainMap); InitArrays(); for (int x = 0; x < width; x++) for (int y = 0; y < height; y++) { int index = y * width + x; tiles[x, y] = new RegionTile(remoteMap, index); } GenerateMesh(); }
public void CopyFromRemote(RegionMap remoteMap, WorldMap mainMap) { if (remoteMap == null) { Debug.Log("Didn't get world map!"); return; } width = 17; height = 17; worldNameEnglish = remoteMap.name_english; regionOrigin = new DFCoord(remoteMap.map_x * 16, remoteMap.map_y * 16, 0); InitArrays(); for (int x = 0; x < width; x++) for (int y = 0; y < height; y++) { int index = y * width + x; tiles[x, y] = new RegionTile(remoteMap.tiles[index]); } if (ContentLoader.Instance != null) GenerateMesh(); }