I put in an act method into my World class, and I have this code:
public class StartWorld extends World
{
int cycles=0;
int picture=1;
public StartWorld()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(600, 400, 1);
}
public void act()
{
cycles++;
if(cycles%10==0)
{
picture++;
}
if(picture==1)
{
(this).setImage("StartGame.png");
}
else if(picture==2)
{
(this).setImage("StartGame2.png");
}
}
}
why doesn't this work?

