thats a problem with your java, it works perfectly for me as in the speed.
and no i cant add the source code right now as the year 11's at my school are doing this project as well so my teacher requested me to remove the source code.
@09blackn
from the top of my head im thinking the code would be somewhat like this:
[code]private boolean dead; // default is false
public void act()
{
checkDeath();
if(!dead) {
//other codes like movement and that.
}
}
private void checkDeath()
{
if(!dead)
{
if(getOneIntersectingObject(Bullet.class)) //returns true if the zombie is hit by a bullet.
{
dead=true;
Greenfoot.setImage("Blood.png");
}
}
}[/code]
the checkDeath() could also just be part of the act, not a seperate "void".
your check for the space bar being pressed should have a flag on it so that it only checks once during the time the space bar is pushed. So if you hold down space bar it wont keep on pauseing and playing.
2012/8/10
pacman
2012/8/8
Guns vs Zombies
2012/8/8
Guns vs Zombies
2012/8/8
Guns vs Zombies
2012/8/7
test of build-in panel
2012/8/7
test of build-in panel
2012/8/7
Save it
2012/8/7
media player
2012/7/19
pacman