Class: Core::Game::MapParticle

Inherits:
Object
  • Object
show all
Defined in:
lib/game/map/map_particle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#followObject

Returns the value of attribute follow.



5
6
7
# File 'lib/game/map/map_particle.rb', line 5

def follow
  @follow
end

#xoffObject

Returns the value of attribute xoff.



5
6
7
# File 'lib/game/map/map_particle.rb', line 5

def xoff
  @xoff
end

#yoffObject

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

#updateObject



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