class Core::Particles

Public Class Methods

new(str, x=0, y=0) click to toggle source
# File lib/particles.rb, line 13
def initialize(str, x=0, y=0)
  @emitter = Core.particles[str].dup
  @emitter.x, @emitter.y = x, y
end

Public Instance Methods

draw(xoff=0, yoff=0) click to toggle source
# File lib/particles.rb, line 32
def draw(xoff=0, yoff=0)
  @emitter.draw(xoff, yoff)
end
gravity=(g) click to toggle source
# File lib/particles.rb, line 26
def gravity=(g)
  @emitter.gravity = g
end
update() click to toggle source
# File lib/particles.rb, line 29
def update
  @emitter.update
end
wind=(w) click to toggle source
# File lib/particles.rb, line 23
def wind=(w)
  @emitter.wind = w
end
x=(x) click to toggle source
# File lib/particles.rb, line 17
def x=(x)
  @emitter.x = x
end
y=(y) click to toggle source
# File lib/particles.rb, line 20
def y=(y)
  @emitter.y = y
end