Class: Apple
- Inherits:
-
Object
- Object
- Apple
- Defined in:
- lib/games_paradise/gui/gosu/garden_hero/core/level/apple.rb
Overview
#
Apple - apple class (collect by player)
#
Instance Attribute Summary collapse
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#draw ⇒ Object
draw.
-
#initialize(window, x, y) ⇒ Apple
constructor
initialize.
Constructor Details
Instance Attribute Details
#x ⇒ Object (readonly)
Returns the value of attribute x.
15 16 17 |
# File 'lib/games_paradise/gui/gosu/garden_hero/core/level/apple.rb', line 15 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
15 16 17 |
# File 'lib/games_paradise/gui/gosu/garden_hero/core/level/apple.rb', line 15 def y @y end |
Instance Method Details
#draw ⇒ Object
draw
17 18 19 |
# File 'lib/games_paradise/gui/gosu/garden_hero/core/level/apple.rb', line 17 def draw @img.draw(@x, @y, 1) end |