So I'm trying to display some text and then change it using this code:
I don't quite understand why it is not working, when I click it doesn't change messages. If anyone would help me out it would be much appreciated!
/**
* Act - do whatever the Title wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
Text1();
Text2();
}
public void Text1()
{
//Displays initial message
setImage(new GreenfootImage("Zaneth was once a peacful place...serene...pure...", 18,
Color.YELLOW, Color.BLACK));
Text2();
}
public void Text2()
{
//On clicked, switch to message part 2
if (Greenfoot.mouseClicked(null)) {
setImage(new GreenfootImage("But all things end, and Felix the Terrible rose to power...", 18,
Color.YELLOW, Color.BLACK));
}
}
}

