so i have a code and im making galaga and i need it too shoot only once per time i press "space" because if i hold space it rapidly shoots
public void shoot()
{
if("space".equals(Greenfoot.getKey()))
{
getWorld().addObject (new ShipLaser(), getX(), getY());
}
}

