class HighScoreScene
Constants
- BLOCK_SIZE
- HEIGHT
- WIDTH
Public Class Methods
new(window)
click to toggle source
Calls superclass method
Scene::new
# File lib/scene.rb, line 156 def initialize(window) super(window) @list = [0] end
Public Instance Methods
add_score(score)
click to toggle source
# File lib/scene.rb, line 162 def add_score(score) @list.append(score) @list = @list.sort.reverse end
draw()
click to toggle source
# File lib/scene.rb, line 171 def draw i = 1 x = 150 y = 10 @list.each do |l| @window.font.draw_text("#{i}. #{l}", x, y, ZOrder::UI, 1.0, 1.0, Gosu::Color::YELLOW) i += 1 y += 50 return if i >= 10 end end