I am coding a jump n run for school which i have to hand in in about two weeks.
I want to add a feature for walls so that they can move around from one edge to another.
Any suggestion for code?
Background should move aswell.
This is the code for the background i created so far, but greenfoot stops if run is pressed.
public void act() { Robby2 Test= new Robby2 (); while(Test.amLeben== true){ Greenfoot.delay(1); imageCount -= 5; drawBackgroundImage(); randomSpawn(); }}public void drawBackgroundImage() { if (imageCount < -bgImage.getWidth()) { imageCount += bgImage.getWidth(); } int temp = imageCount; getBackground().drawImage(bgImage, temp, 0); getBackground().drawImage(bgImage, temp + bgImage.getWidth(), 0); }