use of com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings in project shattered-pixel-dungeon-gdx by 00-Evan.
the class DistortionTrap method activate.
@Override
public void activate() {
InterlevelScene.returnDepth = Dungeon.depth;
Belongings belongings = Dungeon.hero.belongings;
for (Notes.Record rec : Notes.getRecords()) {
if (rec.depth() == Dungeon.depth) {
Notes.remove(rec);
}
}
for (Item i : belongings) {
if (i instanceof LloydsBeacon && ((LloydsBeacon) i).returnDepth == Dungeon.depth)
((LloydsBeacon) i).returnDepth = -1;
}
InterlevelScene.mode = InterlevelScene.Mode.RESET;
Game.switchScene(InterlevelScene.class);
}
use of com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings in project shattered-pixel-dungeon-gdx by 00-Evan.
the class WndBag method placeItems.
protected void placeItems(Bag container) {
// Equipped items
Belongings stuff = Dungeon.hero.belongings;
placeItem(stuff.weapon != null ? stuff.weapon : new Placeholder(ItemSpriteSheet.WEAPON_HOLDER));
placeItem(stuff.armor != null ? stuff.armor : new Placeholder(ItemSpriteSheet.ARMOR_HOLDER));
placeItem(stuff.misc1 != null ? stuff.misc1 : new Placeholder(ItemSpriteSheet.RING_HOLDER));
placeItem(stuff.misc2 != null ? stuff.misc2 : new Placeholder(ItemSpriteSheet.RING_HOLDER));
boolean backpack = (container == Dungeon.hero.belongings.backpack);
if (!backpack) {
count = nCols;
col = 0;
row = 1;
}
// Items in the bag
for (Item item : container.items.toArray(new Item[0])) {
placeItem(item);
}
// Free Space
while (count - (backpack ? 4 : nCols) < container.size) {
placeItem(null);
}
}
Aggregations