Example #1
0
    @Override
    public void emit(Emitter emitter, int index, float x, float y) {
      PixelParticle p = (PixelParticle) emitter.recycle(PixelParticle.Shrinking.class);

      p.reset(x, y, color, 4, Random.Float(0.5f, 1.0f));
      p.speed.polar(Random.Float(dir - cone / 2, dir + cone / 2), Random.Float(40, 80));
      p.acc.set(0, +100);
    }
 @Override
 public void emit(Emitter emitter, int index, float x, float y) {
   ((SnowParticle) emitter.recycle(SnowParticle.class)).reset(x, y);
 }
 @Override
 public void emit(Emitter emitter, int index, float x, float y) {
   ((PoisonParticle) emitter.recycle(PoisonParticle.class)).resetSplash(x, y);
 }
 @Override
 public void emit(Emitter emitter, int index, float x, float y) {
   WaterParticle p = (WaterParticle) emitter.recycle(WaterParticle.class);
   p.reset(x, y);
 }
 @Override
 public void emit(Emitter emitter, int index, float x, float y) {
   for (int i = 0; i < 3; i++) {
     ((WebParticle) emitter.recycle(WebParticle.class)).reset(x, y);
   }
 }
 @Override
 public void emit(Emitter emitter, int index, float x, float y) {
   LeafParticle p = ((LeafParticle) emitter.recycle(LeafParticle.class));
   p.color(ColorMath.random(Dungeon.level.color1, Dungeon.level.color2));
   p.reset(x, y);
 }
 @Override
 public void emit(Emitter emitter, int index, float x, float y) {
   LeafParticle p = ((LeafParticle) emitter.recycle(LeafParticle.class));
   p.color(ColorMath.random(0x004400, 0x88CC44));
   p.reset(x, y);
 }