Search in sources :

Example 1 with WndHero

use of com.watabou.pixeldungeon.windows.WndHero 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);
}
Also used : NinePatch(com.watabou.noosa.NinePatch) Touch(com.watabou.input.Touchscreen.Touch) Image(com.watabou.noosa.Image) WndHero(com.watabou.pixeldungeon.windows.WndHero) BitmaskEmitter(com.watabou.noosa.particles.BitmaskEmitter) TouchArea(com.watabou.noosa.TouchArea) BitmapText(com.watabou.noosa.BitmapText)

Aggregations

Touch (com.watabou.input.Touchscreen.Touch)1 BitmapText (com.watabou.noosa.BitmapText)1 Image (com.watabou.noosa.Image)1 NinePatch (com.watabou.noosa.NinePatch)1 TouchArea (com.watabou.noosa.TouchArea)1 BitmaskEmitter (com.watabou.noosa.particles.BitmaskEmitter)1 WndHero (com.watabou.pixeldungeon.windows.WndHero)1