Class: HealthPowerup
- Inherits:
-
Powerup
- Object
- GameObject
- Powerup
- HealthPowerup
- Defined in:
- lib/entities/powerups/health_powerup.rb
Instance Attribute Summary
Attributes inherited from GameObject
#components, #location, #x, #y
Instance Method Summary collapse
Methods inherited from Powerup
#box, #initialize, #on_collision, #remove, #respawn_delay
Methods inherited from GameObject
#box, #collide, #draw, #effect?, #initialize, #mark_for_removal, #move, #on_collision, #removable?, #update
Constructor Details
This class inherits a constructor from Powerup
Instance Method Details
#graphics ⇒ Object
9 10 11 |
# File 'lib/entities/powerups/health_powerup.rb', line 9 def graphics :life_up end |
#pickup(object) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/entities/powerups/health_powerup.rb', line 2 def pickup(object) if object.class == Tank object.health.increase(25) true end end |