I have a puzzle game, and the goal is to "push" the levers with no order, but once you go through a lever it disappears and it changes the pipe(wall) to a more damaged pipe, until it gets removed and the player goes to the next level, having 3 levels of pipe damage, which are 3 different images for each, which are on top of each other and my train of thought was to remove one by one each time you pick a lever.
public void nextNivel()
{
if (isTouching(Player.class))
{
if(getWorld().getObjects(Lever.class).size() == 3)
{
getWorld().removeObjects(getWorld().getObjects(FirstPipe.class));
getWorld().removeObject(this);
}
if(getWorld().getObjects(FirstPipe.class).size() = 2)
{
getWorld().removeObjects(getWorld().getObjects(Broken1.class));
}
}
}

