Hello,
When I shoot a spear with the spacebar it releases 8 or 10 spears at once. With just one press on the space bar.
Can anybody tell me how I can make sure that just one spear is being released?
Thanks!
Sander
(speer = spear)
the code:
if (Greenfoot.isKeyDown("space")) {
World world = getWorld();
world.addObject(new Speer(), getX(), getY());
}