Class: Stone
- Inherits:
-
GameObject
- Object
- GameObject
- Stone
- Defined in:
- lib/entities/stone.rb
Overview
class Stone
Instance Attribute Summary
Attributes inherited from GameObject
Instance Method Summary collapse
- #hitted(obj) ⇒ Object
-
#initialize(x, y) ⇒ Stone
constructor
A new instance of Stone.
- #update ⇒ Object
Methods inherited from GameObject
#collide?, #collision_detect, #done?, #draw, #solid?
Constructor Details
#initialize(x, y) ⇒ Stone
Returns a new instance of Stone.
5 6 7 8 |
# File 'lib/entities/stone.rb', line 5 def initialize(x, y) super(x, y, 2, 2, true) @sprite = Sprite.new(:stonewall, false) end |
Instance Method Details
#hitted(obj) ⇒ Object
10 11 12 |
# File 'lib/entities/stone.rb', line 10 def hitted(obj) @done = true if obj.powerful == true end |
#update ⇒ Object
14 15 16 |
# File 'lib/entities/stone.rb', line 14 def update @sprite.update end |