use of com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom in project shattered-pixel-dungeon-gdx by 00-Evan.
the class Chasm method heroFall.
public static void heroFall(int pos) {
jumpConfirmed = false;
Sample.INSTANCE.play(Assets.SND_FALLING);
Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
if (buff != null)
buff.detach();
if (Dungeon.hero.isAlive()) {
Dungeon.hero.interrupt();
InterlevelScene.mode = InterlevelScene.Mode.FALL;
if (Dungeon.level instanceof RegularLevel) {
Room room = ((RegularLevel) Dungeon.level).room(pos);
InterlevelScene.fallIntoPit = room != null && room instanceof WeakFloorRoom;
} else {
InterlevelScene.fallIntoPit = false;
}
Game.switchScene(InterlevelScene.class);
} else {
Dungeon.hero.sprite.visible = false;
}
}
Aggregations