Stage::nextBackdrop()
Changes the stage's backdrop to the next one in the backdrop list.
Examples
import org.openpatch.scratch.*;
public class StageNextBackdrop {
public StageNextBackdrop() {
Stage myStage = new Stage(600, 240);
myStage.addBackdrop("forest", "assets/background_forest.png");
myStage.addBackdrop("sea", "assets/background_sea.png");
myStage.wait(2000);
myStage.nextBackdrop();
myStage.wait(2000);
myStage.exit();
}
public static void main(String[] args) {
new StageNextBackdrop();
}
}
Syntax
Java
.nextBackdrop()
Scratch
Return
void