# An emitter simply emits particles at a regular interval. In this case, every # time spawn is called, a new particle is generated with a random angle of movement and speed. class Emitter def initialize(particles) @particles = particles end def spawn (x, y) @particles.create(x, y, rand * 360, (rand * 3)+3) end def draw @particles.draw end def update @particles.update end end