Class: RoadToRubykaigi::Sprite::Bonus
- Inherits:
-
RoadToRubykaigi::Sprite
- Object
- RoadToRubykaigi::Sprite
- RoadToRubykaigi::Sprite::Bonus
- Defined in:
- lib/road_to_rubykaigi/sprite/bonus.rb
Constant Summary collapse
- CHARACTER =
{ ruby: "💎", money: "💰", coffee: "☕️", book: "📚", sushi: "🍣", meat: "🍖", fish: "🐟", beer: "🍺", sake: "🍶", laptop: "💻", }
- TYPE =
{ ruby: :basic, money: :basic, coffee: :basic, book: :basic, sushi: :basic, meat: :basic, fish: :basic, beer: :alcohol, sake: :alcohol, laptop: :laptop, }
Instance Method Summary collapse
Instance Method Details
#bounding_box ⇒ Object
118 119 120 |
# File 'lib/road_to_rubykaigi/sprite/bonus.rb', line 118 def bounding_box { x: @x, y: @y, width: width, height: height } end |
#characters ⇒ Object
122 123 124 |
# File 'lib/road_to_rubykaigi/sprite/bonus.rb', line 122 def characters super { [CHARACTER[@character]] } end |
#height ⇒ Object
130 131 132 |
# File 'lib/road_to_rubykaigi/sprite/bonus.rb', line 130 def height 1 end |
#type ⇒ Object
114 115 116 |
# File 'lib/road_to_rubykaigi/sprite/bonus.rb', line 114 def type TYPE[@character] end |
#width ⇒ Object
126 127 128 |
# File 'lib/road_to_rubykaigi/sprite/bonus.rb', line 126 def width 2 end |