I want to make the bullet to go sideways from specific location , but it is only going up or down.
How do i make this happen?
if (Greenfoot.isKeyDown("x"))
{
if (timer == 0)
fire();
}
}
public void fire()
{
getWorld().addObject(new bullet3(), getX() -14, getY());
timer = +5;
if ( timer >= 5 )
timer = 0;
}