Class: Asteroids::Explosion

Inherits:
GameObject show all
Defined in:
lib/asteroids/explosion/explosion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#xObject

Returns the value of attribute x.



4
5
6
# File 'lib/asteroids/explosion/explosion.rb', line 4

def x
  @x
end

#yObject

Returns the value of attribute y.



4
5
6
# File 'lib/asteroids/explosion/explosion.rb', line 4

def y
  @y
end