Search in sources :

Example 6 with Position

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);
}
Also used : Position(com.nyrds.pixeldungeon.utils.Position) Level(com.watabou.pixeldungeon.levels.Level) InterstitialPoint(com.watabou.noosa.InterstitialPoint)

Aggregations

Position (com.nyrds.pixeldungeon.utils.Position)6 Level (com.watabou.pixeldungeon.levels.Level)3 TrackedRuntimeException (com.nyrds.android.util.TrackedRuntimeException)1 InterstitialPoint (com.watabou.noosa.InterstitialPoint)1 Hunger (com.watabou.pixeldungeon.actors.buffs.Hunger)1 Amulet (com.watabou.pixeldungeon.items.Amulet)1 WndMessage (com.watabou.pixeldungeon.windows.WndMessage)1 IOException (java.io.IOException)1 JSONObject (org.json.JSONObject)1