I know people like to see explosions in games, so here is a really simple example. Like if you're gonna use it in your game! ... or if you just like it :)
if you do not want to use a delay with now Greenfoot.delay() try this:
long starttime = System.currentTimeMillis();
act() {
long endtime =System.currentTimeMillis();
if((endtime - starttime) < 200)
{
return;
}
starttime = System.currentTimeMillis();
.. rest of routine ..
}
this will give you at least a fifth of a second between acts for this actor.
A new version of this scenario was uploaded on 2015-03-05 22:16:37 UTC
This version doesn't have Greenfoot.delay(); so it won't cause glitches in your game.
A new version of this scenario was uploaded on 2015-03-05 23:11:29 UTC
New Explosion!!
Little bit glitchy with the outline.
A new version of this scenario was uploaded on 2015-03-08 22:16:09 UTC
Sounds!
You can click to make it happen!
2015/3/5
2015/3/5
2015/3/5