im trying to make a puzzle game at school but i dont know how do change the different levels i created my try to do this was:
but it doesnt work
For Context it is in my game ending code so instead of having Greenfoot.stop i tried Greenfoot.setWorld(welt2)
1 2 3 4 5 6 7 8 | if (anzahlDiamant == 0 ) { if (anzahlPushy == 0 ) { PushyGewinnt pushyGewinnt = new PushyGewinnt(); addObject(pushyGewinnt, 9 , 7 ); Welt2 welt2 = new Welt2(); Greenfoot.setWorld(welt2); } } |