Search in sources :

Example 6 with Emitter

use of com.watabou.noosa.particles.Emitter in project pixel-dungeon by watabou.

the class GameScene method emitter.

public static Emitter emitter() {
    if (scene != null) {
        Emitter emitter = (Emitter) scene.emitters.recycle(Emitter.class);
        emitter.revive();
        return emitter;
    } else {
        return null;
    }
}
Also used : BlobEmitter(com.watabou.pixeldungeon.effects.BlobEmitter) Emitter(com.watabou.noosa.particles.Emitter)

Example 7 with Emitter

use of com.watabou.noosa.particles.Emitter in project pixel-dungeon by watabou.

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 8 with Emitter

use of com.watabou.noosa.particles.Emitter in project pixel-dungeon by watabou.

the class StatusPane method update.

@Override
public void update() {
    super.update();
    if (tagDanger != danger.visible || tagLoot != loot.visible || tagResume != resume.visible) {
        tagDanger = danger.visible;
        tagLoot = loot.visible;
        tagResume = resume.visible;
        layoutTags();
    }
    float health = (float) Dungeon.hero.HP / Dungeon.hero.HT;
    if (health == 0) {
        avatar.tint(0x000000, 0.6f);
        blood.on = false;
    } else if (health < 0.25f) {
        avatar.tint(0xcc0000, 0.4f);
        blood.on = true;
    } else {
        avatar.resetColor();
        blood.on = false;
    }
    hp.scale.x = health;
    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 = PixelScene.align(27.5f - level.width() / 2);
        level.y = PixelScene.align(28.0f - level.baseLine() / 2);
    }
    int k = IronKey.curDepthQuantity;
    if (k != lastKeys) {
        lastKeys = k;
        keys.text(Integer.toString(lastKeys));
        keys.measure();
        keys.x = width - 8 - keys.width() - 18;
    }
    int tier = Dungeon.hero.tier();
    if (tier != lastTier) {
        lastTier = tier;
        avatar.copy(HeroSprite.avatar(Dungeon.hero.heroClass, tier));
    }
}
Also used : BitmaskEmitter(com.watabou.noosa.particles.BitmaskEmitter) Emitter(com.watabou.noosa.particles.Emitter)

Example 9 with Emitter

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

the class MagesStaff method emitter.

@Override
public Emitter emitter() {
    if (wand == null)
        return null;
    Emitter emitter = new Emitter();
    emitter.pos(12.5f, 3);
    emitter.fillTarget = false;
    emitter.pour(StaffParticleFactory, 0.1f);
    return emitter;
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 10 with Emitter

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

the class CellEmitter method get.

public static Emitter get(int cell) {
    PointF p = DungeonTilemap.tileToWorld(cell);
    Emitter emitter = GameScene.emitter();
    emitter.pos(p.x, p.y, DungeonTilemap.SIZE, DungeonTilemap.SIZE);
    return emitter;
}
Also used : Emitter(com.watabou.noosa.particles.Emitter) PointF(com.watabou.utils.PointF)

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