Class: Core::Game::MapParticle
Instance Attribute Summary collapse
-
#follow ⇒ Object
Returns the value of attribute follow.
-
#xoff ⇒ Object
Returns the value of attribute xoff.
-
#yoff ⇒ Object
Returns the value of attribute yoff.
Instance Method Summary collapse
- #draw(x, y) ⇒ Object
-
#initialize(x, y, effect) ⇒ MapParticle
constructor
A new instance of MapParticle.
- #update ⇒ Object
- #x=(x) ⇒ Object
- #y=(y) ⇒ Object
Constructor Details
#initialize(x, y, effect) ⇒ MapParticle
Returns a new instance of MapParticle.
6 7 8 |
# File 'lib/game/map/map_particle.rb', line 6 def initialize(x, y, effect) @emitter = Core::Particles.new(effect, x, y) end |
Instance Attribute Details
#follow ⇒ Object
Returns the value of attribute follow.
5 6 7 |
# File 'lib/game/map/map_particle.rb', line 5 def follow @follow end |
#xoff ⇒ Object
Returns the value of attribute xoff.
5 6 7 |
# File 'lib/game/map/map_particle.rb', line 5 def xoff @xoff end |
#yoff ⇒ Object
Returns the value of attribute yoff.
5 6 7 |
# File 'lib/game/map/map_particle.rb', line 5 def yoff @yoff end |
Instance Method Details
#draw(x, y) ⇒ Object
22 23 24 |
# File 'lib/game/map/map_particle.rb', line 22 def draw(x, y) @emitter.draw(x, y) end |
#update ⇒ Object
18 19 20 |
# File 'lib/game/map/map_particle.rb', line 18 def update @emitter.update end |
#x=(x) ⇒ Object
10 11 12 |
# File 'lib/game/map/map_particle.rb', line 10 def x=(x) @emitter.x = x end |
#y=(y) ⇒ Object
14 15 16 |
# File 'lib/game/map/map_particle.rb', line 14 def y=(y) @emitter.y = y end |