Files
Forlorn-Hope/src/worldgen/WorldGenerator.java
Mitch Weaver 464bda0b44 initial commit
2017-11-26 03:00:36 +01:00

37 lines
967 B
Java
Executable File

package worldgen;
import static sjgs.utils.Utils.loadImage;
import core.Main;
import player.Player;
import sjgs.core.Handler;
import sjgs.graphics.backgrounds.Background;
import sjgs.graphics.backgrounds.ParallaxBackground;
public class WorldGenerator {
public static ParallaxBackground currentBackground;
public static void generateWorld() {
Handler.clearAll();
Main.player = new Player(0, 0);
TestMapCreator.createTestMap();
final int startX = 0, startY = 0;
final Background background = new Background(loadImage("/background.png"), startX, startY, 100, 0, true);
final Background midground = new Background(loadImage("/midground.png"), startX, startY, 50, 100, true);
final Background foreground = new Background(loadImage("/foreground.png"), startX, startY, 80, 0, true);
currentBackground = new ParallaxBackground(background, midground, foreground);
// currentBackground = new ParallaxBackground(midground);
}
}