Hi, this is my first post. What I'm attempting is a tile-based game, where a level is stored in a variable array. It looks something like this:
int[,] map1 =
{
{1,1,0,0,},
{0,0,0,0,},
{0,0,0,0,}
}
In map1, each number corresponds to a different tile / object. The MapBuilder static class would build the map (create the objects to populate the level) and it would also draw the map objects.
Now I'm trying to figure out how to make it so that...
currentLevel = 1;
MapBuilder.DrawMap("MapBuilder.map" + currentLevel.ToString() );
Basically, I want it to be where currentLevel stores the currently-played level, and you can draw the map depending on the currentLevel variable. This way, I could do the line above where the MapBuilder static class just draws the map of the currently-played level. Is there a function that converts "MapBuilder.map" + currentLevel.ToString() to reference the map variable in the MapBuilder class (where map1 is stored).