Class: EnemyMissile
Instance Method Summary collapse
- #die ⇒ Object
-
#initialize(opts) ⇒ EnemyMissile
constructor
A new instance of EnemyMissile.
Methods inherited from Missile
#align_to, #collision_radius, #draw, #save_init_pos, #update
Constructor Details
#initialize(opts) ⇒ EnemyMissile
Returns a new instance of EnemyMissile.
4 5 6 7 8 |
# File 'lib/enemy_missile.rb', line 4 def initialize opts super @color.alpha = 0 interpolate_alpha(:init => 0, :end => 255, :duration => 2.5) end |
Instance Method Details
#die ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/enemy_missile.rb', line 10 def die super EnemyExplosion.new(:x => @x, :y => @y, :color => @color, :mode => :additive, :final_radius => @width*2.5, :duration => @width/20, :fade_after => (@width/20)*0.65) end |