Module: Playable
- Included in:
- Studio_game::Player
- Defined in:
- lib/studio_game/playable.rb
Instance Method Summary collapse
Instance Method Details
#boost ⇒ Object
2 3 4 5 |
# File 'lib/studio_game/playable.rb', line 2 def boost self.health+=15 # self. relies on the health attr_accessor attribute # you dont need to rely on @health to be an instance variable end |
#drain ⇒ Object
7 8 9 |
# File 'lib/studio_game/playable.rb', line 7 def drain self.health-=10 end |