module StudioGame::Playable
Public Instance Methods
healthpack()
click to toggle source
# File lib/Studiogame/playable.rb, line 3 def healthpack self.health = @health+=10 puts "#{name} got a healthpack!" end
hit()
click to toggle source
# File lib/Studiogame/playable.rb, line 8 def hit self.health = @health-=10 puts "#{name} got hit!" end
status()
click to toggle source
# File lib/Studiogame/playable.rb, line 17 def status strong? ? "strong" : "weak" end
strong?()
click to toggle source
# File lib/Studiogame/playable.rb, line 13 def strong? self.health >= 100 end