Refactoring to allow MyNewLevelGenerator to determine the level type, difficulty and music based on the player metrics.
Work in progress.
This commit is contained in:
@@ -51,8 +51,8 @@ public class LevelScene extends Scene implements SpriteContext {
|
||||
|
||||
protected long levelSeed;
|
||||
protected MarioComponent marioComponent;
|
||||
protected int levelType;
|
||||
protected int levelDifficulty;
|
||||
//protected int levelType;
|
||||
//protected int levelDifficulty;
|
||||
|
||||
public static DataRecorder recorder;
|
||||
|
||||
@@ -66,12 +66,12 @@ public class LevelScene extends Scene implements SpriteContext {
|
||||
private int xArrow, yArrow;
|
||||
|
||||
public LevelScene(GraphicsConfiguration graphicsConfiguration,
|
||||
MarioComponent renderer, long seed, int levelDifficulty, int type) {
|
||||
MarioComponent renderer, long seed/*, int levelDifficulty, int type*/) {
|
||||
this.graphicsConfiguration = graphicsConfiguration;
|
||||
this.levelSeed = seed;
|
||||
this.marioComponent = renderer;
|
||||
this.levelDifficulty = levelDifficulty;
|
||||
this.levelType = type;
|
||||
//this.levelDifficulty = levelDifficulty;
|
||||
//this.levelType = type;
|
||||
|
||||
widthArrow = 25;
|
||||
tipWidthArrow = 10;
|
||||
@@ -282,7 +282,7 @@ public class LevelScene extends Scene implements SpriteContext {
|
||||
|
||||
private DecimalFormat df = new DecimalFormat("00");
|
||||
private DecimalFormat df2 = new DecimalFormat("000");
|
||||
|
||||
|
||||
public void render(Graphics g, float alpha) {
|
||||
int xCam = (int) (mario.xOld + (mario.x - mario.xOld) * alpha) - 160;
|
||||
int yCam = (int) (mario.yOld + (mario.y - mario.yOld) * alpha) - 120;
|
||||
|
||||
Reference in New Issue
Block a user