Class: Warp

Inherits:
Chingu::GameObject
  • Object
show all
Defined in:
lib/prkwars/warp.rb

Overview

Class holding the warp effect used whenever an enemy game object spawns somewhere.

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Warp

Returns a new instance of Warp.



8
9
10
11
12
13
# File 'lib/prkwars/warp.rb', line 8

def initialize(options = {})
  super(options)

  @fade_rate = -8
  @image = Image['media/warp.png']
end

Instance Method Details

#updateObject



15
16
17
# File 'lib/prkwars/warp.rb', line 15

def update
  destroy! if color.alpha.zero?
end