Class: Particles
- Inherits:
-
Object
- Object
- Particles
- Defined in:
- lib/client/particles.rb
Overview
Renderer for moving textures like grass
Instance Method Summary collapse
- #draw(game_map, players) ⇒ Object
-
#initialize(console) ⇒ Particles
constructor
A new instance of Particles.
Constructor Details
#initialize(console) ⇒ Particles
Returns a new instance of Particles.
5 6 7 8 |
# File 'lib/client/particles.rb', line 5 def initialize(console) @console = console @grass_img = Gosu::Image.new(img('grass/single_64.png')) end |
Instance Method Details
#draw(game_map, players) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/client/particles.rb', line 10 def draw(game_map, players) # y = MAP_HEIGHT * TILE_SIZE - TILE_SIZE * 3 # y += TILE_SIZE / 2 # y += 2 # grass(0, TILE_SIZE * 5, y, move_x, move_y) game_map.grass_rows.each do |grass_row| grass(grass_row[:x1], grass_row[:x2], grass_row[:y], players) end end |