use of com.nyrds.pixeldungeon.utils.Position in project pixel-dungeon-remix by NYRDS.
the class InterlevelScene method ascend.
private void ascend() throws IOException {
Actor.fixTime();
Position next = DungeonGenerator.ascend(Dungeon.currentPosition());
Dungeon.level.removePets();
Dungeon.save();
Dungeon.depth = DungeonGenerator.getLevelDepth(next.levelId);
Level level = Dungeon.loadLevel(next);
int exitIndex = -(next.cellId + 1);
Dungeon.switchLevel(level, level.getExit(exitIndex), next.levelId);
Dungeon.hero.spawnPets(level);
}
Aggregations