Search in sources :

Example 1 with Tengu

use of com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Tengu in project shattered-pixel-dungeon-gdx by 00-Evan.

the class PrisonBossLevel method restoreFromBundle.

@Override
public void restoreFromBundle(Bundle bundle) {
    super.restoreFromBundle(bundle);
    state = bundle.getEnum(STATE, State.class);
    // in some states tengu won't be in the world, in others he will be.
    if (state == State.START || state == State.MAZE) {
        tengu = (Tengu) bundle.get(TENGU);
    } else {
        for (Mob mob : mobs) {
            if (mob instanceof Tengu) {
                tengu = (Tengu) mob;
                break;
            }
        }
    }
    for (Bundlable item : bundle.getCollection(STORED_ITEMS)) {
        storedItems.add((Item) item);
    }
}
Also used : Mob(com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob) Bundlable(com.watabou.utils.Bundlable) Tengu(com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Tengu)

Aggregations

Mob (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob)1 Tengu (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Tengu)1 Bundlable (com.watabou.utils.Bundlable)1