initial commit
This commit is contained in:
36
src/worldgen/WorldGenerator.java
Executable file
36
src/worldgen/WorldGenerator.java
Executable file
@@ -0,0 +1,36 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user