Search in sources :

Example 31 with Emitter

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

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.heightLimit(Fireball.this.y - 30);
            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)

Example 32 with Emitter

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

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

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

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)

Example 34 with Emitter

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

the class Armor method emitter.

@Override
public Emitter emitter() {
    if (seal == null)
        return super.emitter();
    Emitter emitter = new Emitter();
    emitter.pos(ItemSpriteSheet.film.width(image) / 2f + 2f, ItemSpriteSheet.film.height(image) / 3f);
    emitter.fillTarget = false;
    emitter.pour(Speck.factory(Speck.RED_LIGHT), 0.6f);
    return emitter;
}
Also used : Emitter(com.watabou.noosa.particles.Emitter)

Example 35 with Emitter

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

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.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter) 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