Hi guys,
We're experiencing a rather large sized problem. We're creating a game for a school project in which we want the player to move around while the world moves along. We've decided to implement the "Scrolling world Demo" scrollworld class. It compiles and all, but the new background is white instead of the declared image.
Here are the ScrollWorld setnewbackground function and the usage of the setnewbackground function in our world-class.
setNewBackground function:
And our implementation:
Thanks,
Tom
public void setNewBackground(GreenfootImage background)
{
GreenfootImage back = background;
bigBackground.clear();
bigBackground.drawImage(back, 0,0);
bigBackground.drawImage(back, width,0);
bigBackground.drawImage(back, 0,height);
bigBackground.drawImage(back, width,height);
back.drawImage(bigBackground, scrollPosX, scrollPosY);
}GreenfootImage lvl1 = new GreenfootImage("lvl1.png");
setNewBackground(lvl1);
bestandsnaam = "upfrombelow";

