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;
}
}
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);
}
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;
}
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;
}
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);
}
Aggregations