Search in sources :

Example 46 with Emitter

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

the class Torch method execute.

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

Example 47 with Emitter

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

the class Splash method at.

public static void at(PointF p, final float dir, final float cone, final int color, int n) {
    if (n <= 0) {
        return;
    }
    Emitter emitter = GameScene.emitter();
    emitter.pos(p);
    FACTORY.color = color;
    FACTORY.dir = dir;
    FACTORY.cone = cone;
    emitter.burst(FACTORY, n);
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 48 with Emitter

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

the class Splash method at.

public static void at(PointF p, final int color, int n) {
    if (n <= 0) {
        return;
    }
    Emitter emitter = GameScene.emitter();
    emitter.pos(p);
    FACTORY.color = color;
    FACTORY.dir = -3.1415926f / 2;
    FACTORY.cone = 3.1415926f;
    emitter.burst(FACTORY, n);
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

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