Here is my code...
public void nextLevel(Class x, Class y)
{
if (getOneIntersectingObject(x) != null)
{
Greenfoot.setWorld(new y);
}
}
im trying to create this so that i dont have to individualy set the world to a new one for each of my end of level flags...
the 5th line where it sais Greenfoot.setWorld(new y); does not work i have also tried (new y()) but neither work
