Class: GamesAndRpgParadise::GardenHero::Star
- Inherits:
-
Object
- Object
- GamesAndRpgParadise::GardenHero::Star
- Defined in:
- lib/games_and_rpg_paradise/gui/gosu/garden_hero/core/level/star.rb
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) ⇒ Star
constructor
initialize.
Constructor Details
#initialize(window, x, y) ⇒ Star
initialize
14 15 16 17 |
# File 'lib/games_and_rpg_paradise/gui/gosu/garden_hero/core/level/star.rb', line 14 def initialize(window, x, y) @window, @x, @y = window, x, y @img = Gosu::Image.new window, "images/player/star.png", true end |
Instance Attribute Details
#x ⇒ Object (readonly)
Returns the value of attribute x.
19 20 21 |
# File 'lib/games_and_rpg_paradise/gui/gosu/garden_hero/core/level/star.rb', line 19 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
19 20 21 |
# File 'lib/games_and_rpg_paradise/gui/gosu/garden_hero/core/level/star.rb', line 19 def y @y end |
Instance Method Details
#draw ⇒ Object
draw
22 23 24 |
# File 'lib/games_and_rpg_paradise/gui/gosu/garden_hero/core/level/star.rb', line 22 def draw @img.draw(@x, @y, 1) end |