I want to have multiple levels. I am using a switch statement for that. 
My problem is the selection of the levels. I created objects as buttons for the level selection. They were supposed to be selected with a mouse click.
I am kind stuck. The other all parts work. The mistake has to be within these lines and I'm not sure where. 
If anyone could help I would be thankful.
  //adds object levelOneButton
Actor buttonOne = new levelOneButton();
addObject(buttonOne, 250,400);
//clicking the button is supposed change the level variable
if(Greenfoot.mouseClicked(buttonOne))
{
removeObjects(getObjects(null));
level = 2;
}
          
        
  

