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