diff --git a/src/main/java/JumpGame.java b/src/main/java/JumpGame.java index c711359..608970f 100644 --- a/src/main/java/JumpGame.java +++ b/src/main/java/JumpGame.java @@ -12,15 +12,8 @@ public class JumpGame { //--------------------------------------------------------------- // private Time time = new Time(); -// private Position position = new Position(ground); // private Gameover gameover = new Gameover(position); -// private Onground onground = new Onground(ground, position); -// private Velocity velocity = new Velocity(position, onground); // private Clear clear = new Clear(position); -// private Move move = new Move(velocity); -// private Acceleration acceleration = new Acceleration(velocity, onground); -// private Force force = new Force(acceleration); -// private Mass mass = new Mass(acceleration); //--------------------------------------------------------------- // new @@ -44,7 +37,9 @@ // model models.add(new GroundModel()); - models.add(new PlayerModel(models.get(ModelType.GroundModel))); + + GroundModel groundModel = (GroundModel) models.get(ModelType.GroundModel); + models.add(new PlayerModel(groundModel.getGround())); // view views.add(new TileRenderer("resources/tile.png", 1)); @@ -76,6 +71,5 @@ } //--------------------------------------------------------------- - //--------------------------------------------------------------- } \ No newline at end of file diff --git a/src/main/java/models/PlayerModel.java b/src/main/java/models/PlayerModel.java index 3b530a0..e992429 100644 --- a/src/main/java/models/PlayerModel.java +++ b/src/main/java/models/PlayerModel.java @@ -19,11 +19,10 @@ //--------------------------------------------------------------- // - public PlayerModel(IModel model) { - GroundModel groundModel = (GroundModel)model; + public PlayerModel(Ground ground) { - position = new Position(new Pair<>(640d, 480d), groundModel.getGround()); - onground = new Onground(groundModel.getGround(), position); + position = new Position(new Pair<>(640d, 480d), ground); + onground = new Onground(ground, position); velocity = new Velocity(position, onground); acceleration = new Acceleration(velocity, onground); force = new Force(acceleration); diff --git a/src/main/java/views/TileMapRenderer.java b/src/main/java/views/TileMapRenderer.java new file mode 100644 index 0000000..478c182 --- /dev/null +++ b/src/main/java/views/TileMapRenderer.java @@ -0,0 +1,4 @@ +package views; + +public class TileMapRenderer { +}