How similar are the codes of your different levels? is it only the 'prepare' and 'act' methods (minus the timer code) that are different?
What code do you have in your player class for calling the game over method in the world class?


1 2 3 | Actor actor = new SimpleActor(); actor.setImage( new GreenfootImage( "You survived for " +time+ " seconds\n\nPlay again?" , 72 , null , null )); addObject(actor, 300 , 200 ); |
1 2 3 4 5 6 7 8 9 10 | public void hitDetection() { Actor enemy; enemy = getOneIntersectingObject(Enemy. class ); if (enemy != null ) { AvoiderWorldEasy world1 = (AvoiderWorldEasy)getWorld(); world1.endGame1(); } } |
1 2 3 4 5 6 7 8 9 10 | public void hitDetection() { Actor enemy; enemy = getOneIntersectingObject(Enemy. class ); if (enemy != null ) { AvoiderWorldEasy world1 = (AvoiderWorldEasy)getWorld(); world1.endGame1(); } } |