Class: Scoreboard
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(world) ⇒ Scoreboard
constructor
A new instance of Scoreboard.
- #pixel(x, y, rx, ry, ticks) ⇒ Object
- #template ⇒ Object
- #width ⇒ Object
- #x ⇒ Object
- #y ⇒ Object
Methods included from Renderable
Constructor Details
#initialize(world) ⇒ Scoreboard
Returns a new instance of Scoreboard.
398 399 400 |
# File 'lib/roflbalt.rb', line 398 def initialize world @world = world end |
Instance Method Details
#height ⇒ Object
401 |
# File 'lib/roflbalt.rb', line 401 def height; 3 end |
#pixel(x, y, rx, ry, ticks) ⇒ Object
412 413 414 |
# File 'lib/roflbalt.rb', line 412 def pixel x, y, rx, ry, ticks Pixel.new template[ry][rx], 244, 234 end |
#template ⇒ Object
405 406 407 408 409 410 411 |
# File 'lib/roflbalt.rb', line 405 def template [ ' ', ' Score: %9s ' % [ @world.distance], ' ' ] end |
#width ⇒ Object
402 |
# File 'lib/roflbalt.rb', line 402 def width; 20 end |
#x ⇒ Object
403 |
# File 'lib/roflbalt.rb', line 403 def x; -18 end |
#y ⇒ Object
404 |
# File 'lib/roflbalt.rb', line 404 def y; 1 end |