Search in sources :

Example 36 with Emitter

use of com.watabou.noosa.particles.Emitter in project shattered-pixel-dungeon-gdx by 00-Evan.

the class BlacksmithSprite method link.

@Override
public void link(Char ch) {
    super.link(ch);
    emitter = new Emitter();
    emitter.autoKill = false;
    emitter.pos(x + 7, y + 12);
    parent.add(emitter);
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 37 with Emitter

use of com.watabou.noosa.particles.Emitter in project shattered-pixel-dungeon-gdx by 00-Evan.

the class CharSprite method emitter.

public Emitter emitter() {
    Emitter emitter = GameScene.emitter();
    emitter.pos(this);
    return emitter;
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 38 with Emitter

use of com.watabou.noosa.particles.Emitter in project shattered-pixel-dungeon-gdx by 00-Evan.

the class CharSprite method bottomEmitter.

public Emitter bottomEmitter() {
    Emitter emitter = GameScene.emitter();
    emitter.pos(x, y + height, width, 0);
    return emitter;
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 39 with Emitter

use of com.watabou.noosa.particles.Emitter in project shattered-pixel-dungeon-gdx by 00-Evan.

the class StatusPane method update.

@Override
public void update() {
    super.update();
    float health = Dungeon.hero.HP;
    float shield = Dungeon.hero.SHLD;
    float max = Dungeon.hero.HT;
    if (!Dungeon.hero.isAlive()) {
        avatar.tint(0x000000, 0.5f);
    } else if ((health / max) < 0.3f) {
        warning += Game.elapsed * 5f * (0.4f - (health / max));
        warning %= 1f;
        avatar.tint(ColorMath.interpolate(warning, warningColors), 0.5f);
    } else {
        avatar.resetColor();
    }
    hp.scale.x = Math.max(0, (health - shield) / max);
    shieldedHP.scale.x = health / max;
    rawShielding.scale.x = shield / max;
    exp.scale.x = (width / exp.width) * Dungeon.hero.exp / Dungeon.hero.maxExp();
    if (Dungeon.hero.lvl != lastLvl) {
        if (lastLvl != -1) {
            Emitter emitter = (Emitter) recycle(Emitter.class);
            emitter.revive();
            emitter.pos(27, 27);
            emitter.burst(Speck.factory(Speck.STAR), 12);
        }
        lastLvl = Dungeon.hero.lvl;
        level.text(Integer.toString(lastLvl));
        level.measure();
        level.x = 27.5f - level.width() / 2f;
        level.y = 28.0f - level.baseLine() / 2f;
        PixelScene.align(level);
    }
    int tier = Dungeon.hero.tier();
    if (tier != lastTier) {
        lastTier = tier;
        avatar.copy(HeroSprite.avatar(Dungeon.hero.heroClass, tier));
    }
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 40 with Emitter

use of com.watabou.noosa.particles.Emitter in project shattered-pixel-dungeon-gdx by 00-Evan.

the class BossHealthBar method createChildren.

@Override
protected void createChildren() {
    bar = new Image(asset, 0, 0, 64, 16);
    add(bar);
    width = bar.width;
    height = bar.height;
    hp = new Image(asset, 15, 19, 47, 4);
    add(hp);
    skull = new Image(asset, 5, 18, 6, 6);
    add(skull);
    blood = new Emitter();
    blood.pos(skull);
    blood.pour(BloodParticle.FACTORY, 0.3f);
    blood.autoKill = false;
    blood.on = false;
    add(blood);
}
Also used : Emitter(com.watabou.noosa.particles.Emitter) Image(com.watabou.noosa.Image)

Aggregations

Emitter (com.watabou.noosa.particles.Emitter)48 PointF (com.watabou.utils.PointF)9 Image (com.watabou.noosa.Image)6 Group (com.watabou.noosa.Group)4 BitmapText (com.watabou.noosa.BitmapText)2 BlobEmitter (com.watabou.pixeldungeon.effects.BlobEmitter)2 ItemSprite (com.watabou.pixeldungeon.sprites.ItemSprite)2 WndHeroSpells (com.nyrds.pixeldungeon.windows.WndHeroSpells)1 BlobEmitter (com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter)1 CellEmitter (com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter)1 Touch (com.watabou.input.Touchscreen.Touch)1 CompositeTextureImage (com.watabou.noosa.CompositeTextureImage)1 NinePatch (com.watabou.noosa.NinePatch)1 TouchArea (com.watabou.noosa.TouchArea)1 BitmaskEmitter (com.watabou.noosa.particles.BitmaskEmitter)1 Barkskin (com.watabou.pixeldungeon.actors.buffs.Barkskin)1 Hero (com.watabou.pixeldungeon.actors.hero.Hero)1 CellEmitter (com.watabou.pixeldungeon.effects.CellEmitter)1 Dewdrop (com.watabou.pixeldungeon.items.Dewdrop)1 Herbalism (com.watabou.pixeldungeon.items.rings.RingOfHerbalism.Herbalism)1