what is the code and what do you put it under to change levels as soon as the main player hits an object
//in your player class; if (getOneIntersectingObject(EndObject.class) != null) { //you reached the end object; But you'll have to change the EndObject.class to your classname; //here you can start the new level; Greenfoot.setWorld(new Level2());//just a guess; }
int objectCount = getWorld().numberOfObjects();