Hi i'm trying to get to grips with using boolean's and use it in my level layout. I think it should be something like setting Level 1() true then if score equal to set amount then set Level2() ture and Level1()false. Please forgive anything done wrong as i'm just getting to grips and i'm not sure on how to go about this. This is my current code
/**
* Constructor for objects of class MyWorld.
*
*/
public MyWorld()throws IOException
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(600,400,1);
Level1();
//Level2();
}
public Counter getCounter()
{
return counter;
}
private void perpare()
{
addObject(counter,40,15);
}
public void Level1()throws IOException
{
mapArray = readMapFromTextFile(MAP_WIDTH, MAP_HEIGHT, FILENAME);
drawWallMapFromTextArray(WALL_WIDTH,WALL_HEIGHT,WALL_MARKER,PLAYER_WIDTH, PLAYER_HEIGHT, PLAYER_SPAWN,PLAYER_PU_WIDTH, PLAYER_PU_HEIGHT, PICK_UP, mapArray);
perpare();
}
public void Level2()throws IOException
{
mapArray = readMapFromTextFile(MAP_WIDTH, MAP_HEIGHT, FILENAME2);
drawWallMapFromTextArray(WALL_WIDTH,WALL_HEIGHT,WALL_MARKER,PLAYER_WIDTH, PLAYER_HEIGHT, PLAYER_SPAWN,PLAYER_PU_WIDTH, PLAYER_PU_HEIGHT, PICK_UP, mapArray);
perpare();
}
