So, I’m creating a Greenfoot project which isn’t school-related for the first time ever. I’m still kinda a newbie here. Now my problem is that my main menu doesn’t run although the code seems to be correctly. (I followed a YouTube tutorial cause as I said newbie.) I can try to run act but nothing happens. Any tips here?
public class MainMenu extends World { /** * Constructor for objects of class MainMenu. * */ public MainMenu() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(1920, 1080, 1); GreenfootImage bg = new GreenfootImage("london-background.png"); bg.scale(getWidth(), getHeight()); setBackground(bg); mainMenu(); } private void mainMenu() { Logo logo = new Logo(); addObject(logo, 1980, 1080); } public void act() { if(Greenfoot.isKeyDown("space")) { Greenfoot.setWorld(new playQuiz()); } } }