Search in sources :

Example 11 with Emitter

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

the class CellEmitter method bottom.

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

Example 12 with Emitter

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

the class ItemSprite method view.

public ItemSprite view(Item item) {
    view(item.image(), item.glowing());
    Emitter emitter = item.emitter();
    if (emitter != null && parent != null) {
        emitter.pos(this);
        parent.add(emitter);
        this.emitter = emitter;
    }
    return this;
}
Also used : CellEmitter(com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter) Emitter(com.watabou.noosa.particles.Emitter)

Example 13 with Emitter

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

the class CharSprite method centerEmitter.

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

Example 14 with Emitter

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

the class Torch method execute.

@Override
public void execute(Hero hero, String action) {
    super.execute(hero, action);
    if (action.equals(AC_LIGHT)) {
        hero.spend(TIME_TO_LIGHT);
        hero.busy();
        hero.sprite.operate(hero.pos);
        detach(hero.belongings.backpack);
        Buff.affect(hero, Light.class, Light.DURATION);
        Emitter emitter = hero.sprite.centerEmitter();
        emitter.start(FlameParticle.FACTORY, 0.2f, 3);
    }
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 15 with Emitter

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

the class NewFireball 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 = -120;
    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