Class: Asteroids::Explosion
- Inherits:
-
GameObject
- Object
- GameObject
- Asteroids::Explosion
- Defined in:
- lib/asteroids/explosion/explosion.rb
Instance Attribute Summary collapse
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(object_pool, x, y) ⇒ Explosion
constructor
A new instance of Explosion.
Methods inherited from GameObject
#components, #draw, #mark_for_removal, #removable?, #update
Constructor Details
#initialize(object_pool, x, y) ⇒ Explosion
Returns a new instance of Explosion.
6 7 8 9 10 11 |
# File 'lib/asteroids/explosion/explosion.rb', line 6 def initialize(object_pool, x, y) super(object_pool) @x, @y = x, y @current_frame = 0 ExplosionGraphics.new(self) end |
Instance Attribute Details
#x ⇒ Object
Returns the value of attribute x.
4 5 6 |
# File 'lib/asteroids/explosion/explosion.rb', line 4 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
4 5 6 |
# File 'lib/asteroids/explosion/explosion.rb', line 4 def y @y end |