@Override protected void createChildren() { shield = new NinePatch(Assets.STATUS, 80, 0, 30 + 18, 0); add(shield); add( new TouchArea(0, 1, 31, 31) { @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 Emitter(); blood.pos(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); buffs = new BuffIndicator(Dungeon.hero); add(buffs); }
@Override public void link(Char ch) { super.link(ch); emitter = new Emitter(); emitter.autoKill = false; emitter.pos(x + 7, y + 12); parent.add(emitter); }