So I made a Method in my Shooter Class which adds a new object when Space is Pressed, but it creates a whole lot of bullets. I only want 1 bullet to be shot when Spacebar is pressed, but I am not sure how I can make that happen.
and then further down on the class:
public void shoot()
{
getWorld().addObject(new bullet(), getX(), getY());
}if (Greenfoot.isKeyDown("space"))
{
shoot();
}
