diff --git a/src/main/java/JumpGame.java b/src/main/java/JumpGame.java index 9927138..612856d 100644 --- a/src/main/java/JumpGame.java +++ b/src/main/java/JumpGame.java @@ -18,7 +18,6 @@ //--------------------------------------------------------------- // public void gravity(double y) { -// this.time.gravity(y); JumpGameModel jumpGameModel = (JumpGameModel) model; jumpGameModel.updateGravity(y); } @@ -35,12 +34,22 @@ // 更新処理 public void update() { + JumpGameModel jumpGameModel = (JumpGameModel) model; + // Viewの更新 - for (IView view : views){ + for (IView view : views) { view.update(model); view.display(); } + // ステージが排出する地形データを切り替える + if (jumpGameModel.isTimingOfChangeTile()) { + jumpGameModel.changeTileType(); + + TileMapRenderer tileMapRenderer = (TileMapRenderer) views.get(0); + tileMapRenderer.createTile(jumpGameModel.getTileType()); + } + // Modelの更新 // // Space キーのインプット