i have a class which when i click it the world will change, but it seems doesnt work, any help?
code for the class
public class Quit extends Property
{
public void act()
{
if (Greenfoot.mouseClicked(this)) {
Greenfoot.setWorld(new CreditWorld());
}
}
}


