@Override public void update() { super.update(); // alpha: 1 -> 0; size: 1 -> 4 size(4 - (am = left / lifespan) * 3); // color: 0x8844FF -> 0x00FF00 color(ColorMath.interpolate(0x00FF00, 0x8844FF, am)); }
public WaterParticle() { super(); acc.y = 50; am = 0.5f; color(ColorMath.random(0xb6ccc2, 0x3b6653)); size(2); }
@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); }