HI, I need help of making the the soldier shoot multiple bullet at once but in different direction,like the shotgun. Her's my current shooting code.
public void shoot()
{
if(timer > 0)timer--;
if(timer==0 &&Greenfoot.isKeyDown("space") && bulletCheck == false)
{
getWorld().addObject(new Bullet(soldierRotation), getX(), getY());
timer=60;
Greenfoot.playSound("Shotgun.wav");
bulletCheck = true;
}
if(!Greenfoot.isKeyDown("space") && bulletCheck == true)
{
bulletCheck = false;
Greenfoot.playSound("shotgunshell.wav");
}
}
