Search in sources :

Example 41 with Emitter

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

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

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

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);
    getParent().add(emitter);
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 43 with Emitter

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

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

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

the class MagicTorch method cast.

@Override
public boolean cast(@NonNull Char chr) {
    if (super.cast(chr)) {
        if (chr.isAlive()) {
            castCallback(chr);
            Buff.affect(chr, com.watabou.pixeldungeon.actors.buffs.Light.class, duration);
            Emitter emitter = chr.getSprite().centerEmitter();
            emitter.start(FlameParticle.FACTORY, 0.2f, 3);
            return true;
        }
    }
    return false;
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 45 with Emitter

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

the class Fireball method createChildren.

@Override
protected void createChildren() {
    sparks = new Group();
    add(sparks);
    bLight = new Image(Assets.FIREBALL);
    bLight.frame(BLIGHT);
    bLight.origin.set(bLight.width / 2);
    bLight.angularSpeed = -90;
    add(bLight);
    emitter = new Emitter();
    emitter.pour(new Emitter.Factory() {

        @Override
        public void emit(Emitter emitter, int index, float x, float y) {
            Flame p = (Flame) emitter.recycle(Flame.class);
            p.reset();
            p.x = x - p.width / 2;
            p.y = y - p.height / 2;
        }
    }, 0.1f);
    add(emitter);
    fLight = new Image(Assets.FIREBALL);
    fLight.frame(FLIGHT);
    fLight.origin.set(fLight.width / 2);
    fLight.angularSpeed = 360;
    add(fLight);
    bLight.texture.filter(Texture.LINEAR, Texture.LINEAR);
}
Also used : Group(com.watabou.noosa.Group) 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