anybody can help me about shooting left
http://www.greenfoot.org/scenarios/11168
also how can I upload without lock .. I mean everybody can play it and download it
public boolean shooting()
{
if(Greenfoot.isKeyDown("space") && shootingCounter <= 0 && direction == 1)
{
getWorld().addObject( new SilverBullet(), getX(), getY());
shootingCounter = 20;
return true;
}
else if(Greenfoot.isKeyDown("space") && shootingCounter <= 0 && direction == -1)
{
getWorld().addObject( new SilverBullet(), getX(), getY());
shootingCounter = 20;
return true;
}
return false;
}private void fly()
{
move(shootingSpeed);
}public boolean shooting()
{
if (shootingCounter > 0 || !Greenfoot.isKeyDown("space")) return false;
Actor sb = new SilverBullet();
if (direction == -1) sb.setRotation(180);
getWorld().addObject(sb, getX(), getY());
shootingCounter = 20;
return true;
}