Class: LittleBrat::Instructions

Inherits:
Object
  • Object
show all
Defined in:
lib/littlebrat.rb

Instance Method Summary collapse

Constructor Details

#initialize(window, text = "Let's shut those little brats up!") ⇒ Instructions

Returns a new instance of Instructions.



76
77
78
79
80
81
82
83
# File 'lib/littlebrat.rb', line 76

def initialize window, text = "Let's shut those little brats up!"
  @image = Gosu::Image.from_text window,
                                 "#{text}\nPress CTRL+Q to exit",
                                 Gosu::default_font_name,
                                 100
  @color = 0xffffff00
  @x, @y = 10, 10
end

Instance Method Details

#drawObject



85
86
87
# File 'lib/littlebrat.rb', line 85

def draw
  @image.draw @x, @y, 1, 0.5, 0.5, @color
end