Exemple #1
0
  public void goUp() {
    dungeonLevel--;

    getCurrentMap()
        .place(
            GamePanel.get().getPlayer(),
            GamePanel.get().getPlayer().getX(),
            GamePanel.get().getPlayer().getY(),
            true);

    GamePanel.get().getPlayer().see();

    GamePanel.get().logMessage("Going up...", Color.lightGray);
  }
Exemple #2
0
  public void goDown() {
    if (dungeonMapList.size() < dungeonLevel + 2) {
      dungeonMapList.add(DungeonMap.generateMap(this, dungeonLevel + 2));
    }

    dungeonLevel++;

    getCurrentMap()
        .place(
            GamePanel.get().getPlayer(),
            GamePanel.get().getPlayer().getX(),
            GamePanel.get().getPlayer().getY(),
            true);

    GamePanel.get().getPlayer().see();

    GamePanel.get().logMessage("Going down...", Color.darkGray);
  }