Class: Rubygoal::Gui::Goal
- Inherits:
-
Object
- Object
- Rubygoal::Gui::Goal
- Defined in:
- lib/rubygoal/gui/goal.rb
Constant Summary collapse
- CELEBRATION_IMAGE_POSITION =
Rubygoal::Position.new(680, 466)
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(window) ⇒ Goal
constructor
A new instance of Goal.
Constructor Details
#initialize(window) ⇒ Goal
Returns a new instance of Goal.
9 10 11 12 |
# File 'lib/rubygoal/gui/goal.rb', line 9 def initialize(window) image_path = File.dirname(__FILE__) + '/../../../media/goal.png' @image = Gosu::Image.new(window, image_path, true) end |
Instance Method Details
#draw ⇒ Object
14 15 16 17 |
# File 'lib/rubygoal/gui/goal.rb', line 14 def draw position = CELEBRATION_IMAGE_POSITION image.draw(position.x, position.y, 1) end |