Module: Renderable
- Included in:
- Blood, Building, GameOverBanner, Player, RoflCopter, Scoreboard
- Defined in:
- lib/roflbalt.rb
Instance Method Summary collapse
Instance Method Details
#each_pixel(ticks) ⇒ Object
257 258 259 260 261 262 263 264 265 |
# File 'lib/roflbalt.rb', line 257 def each_pixel ticks (y...(y + height)).each do |y| (x...(x + width)).each do |x| rx = x - self.x ry = y - self.y yield x, y, pixel(x, y, rx, ry, ticks) end end end |
#right_x ⇒ Object
266 |
# File 'lib/roflbalt.rb', line 266 def right_x; x + width end |