Iām creating a random tile-based map generator. I have pre-made sets of integers to make specific rooms or hallways for the generator but I want to be able to randomly select what integer set is made. Here is the level creator function ā any help would be appreciated
private void CreateLevel () {
string[] mapData = new string[] {
"03010", "03010", "03010", "22022", "22222"
};
int mapX = mapData[0].ToCharArray().Length;
int mapY = mapData.Length;
Vector3 worldStart = Camera.main.ScreenToWorldPoint (new Vector3 (0, Screen.height));
for (int y = 0; y < mapY; y++) {
char[] newTiles = mapData [y].ToCharArray ();
for (int x = 0; x < mapX; x++) {
PlaceTile (newTiles[x].ToString(), x, y, worldStart);
}
}
}