use of com.watabou.noosa.NinePatch in project pixel-dungeon by watabou.
the class StatusPane method createChildren.
@Override
protected void createChildren() {
shield = new NinePatch(Assets.STATUS, 80, 0, 30 + 18, 0);
add(shield);
add(new TouchArea(0, 1, 30, 30) {
@Override
protected void onClick(Touch touch) {
Image sprite = Dungeon.hero.sprite;
if (!sprite.isVisible()) {
Camera.main.focusOn(sprite);
}
GameScene.show(new WndHero());
}
;
});
btnMenu = new MenuButton();
add(btnMenu);
avatar = HeroSprite.avatar(Dungeon.hero.heroClass, lastTier);
add(avatar);
blood = new BitmaskEmitter(avatar);
blood.pour(BloodParticle.FACTORY, 0.3f);
blood.autoKill = false;
blood.on = false;
add(blood);
compass = new Compass(Dungeon.level.exit);
add(compass);
hp = new Image(Assets.HP_BAR);
add(hp);
exp = new Image(Assets.XP_BAR);
add(exp);
level = new BitmapText(PixelScene.font1x);
level.hardlight(0xFFEBA4);
add(level);
depth = new BitmapText(Integer.toString(Dungeon.depth), PixelScene.font1x);
depth.hardlight(0xCACFC2);
depth.measure();
add(depth);
Dungeon.hero.belongings.countIronKeys();
keys = new BitmapText(PixelScene.font1x);
keys.hardlight(0xCACFC2);
add(keys);
danger = new DangerIndicator();
add(danger);
loot = new LootIndicator();
add(loot);
resume = new ResumeButton();
add(resume);
buffs = new BuffIndicator(Dungeon.hero);
add(buffs);
}
Aggregations