Method: Core::Particle#update
- Defined in:
- lib/particles.rb
#update ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/particles.rb', line 53 def update @x += @sx + @wind @y += @sy + @gravity @age += 1 if @x > 1024 or @x < -@img.width or @y > 768+@img.height or @y < -@img.height or @age >= @lifetime @dead = true end end |