Class: Rubygoal::Gui::Goal

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygoal/gui/goal.rb

Constant Summary collapse

CELEBRATION_IMAGE_POSITION =
Rubygoal::Position.new(680, 466)

Instance Method Summary collapse

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

#drawObject



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