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