setBackground("chp1.png");
while(true){if(Greenfoot.isKeyDown("enter")){break;}}
setBackground("start.png");
break;
i have that code in a switch statement. When it is executed, the background doesnt change at first and when enter is press, the background goes to start.png????? Is there a easy way of doing wait until? Thx in advance
If i replace the loop with a Greenfoot.delay(x) it works fine?