Hello, I have a question. So I have to make this game kinda like piano tiles and I want to make a title/start screen. I used some codes but if I click on enter it doesn't work. The code I used is:
I put it as a world, but it didn't work...
import greenfoot.*;
/**
* Write a description of class StartScreen here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class StartScreen extends World
{
/**
* Constructor for objects of class StartScreen.
*
*/
public StartScreen()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(800, 600, 1);
prepare();
}
private void prepare()
{
TitleLetters titleletters = new TitleLetters();
addObject(titleletters, 400, 300);
}
public void act()
{
click();
}
private void click()
{
if(Greenfoot.mouseClicked(this))
{
Greenfoot.setWorld(new MusicFallWorld());
}
}
}
can anyone help me?

