So I have the following situations:
The world, a map which I'll call Harta:
A banner appears on Harta saying Election Day.
Banner waits a couple of seconds then disappears.
Things happen on the map and it waits a couple of seconds;
World changes.
That's what I want it to do, at least.
In my case, it happens like this:
A banner appears on Harta saying Election Day.
Banner waits a couple of seconds then disappears.
Things happen on the map but world changes simultaneously and you can't see the changes. Basically, it doesn't wait.
Here's the code which should change the map:
I tried many things, like stopping Greenfoot then starting it again and adding delays, but nothing's working. I'd be glad if someone could help me! :)
if (elecDem>=270)
{
Greenfoot.delay(240);
Greenfoot.setWorld(new Hillary());
}
else
{
if (elecRep>=270)
{
Greenfoot.delay(240);
Greenfoot.setWorld(new Donald());
}
}
