Wrote the particle emitter's update logic.