class Warp
Class holding the warp effect used whenever an enemy game object spawns somewhere.
Public Class Methods
new(options = {})
click to toggle source
Sets the image of a warp as well as its fade rate.
Calls superclass method
# File lib/prkwars/warp.rb, line 10 def initialize(options = {}) super(options) @fade_rate = -8 @image = Image['media/warp.png'] end
Public Instance Methods
update()
click to toggle source
Destroys a Warp
if it faded out.
# File lib/prkwars/warp.rb, line 19 def update destroy! if color.alpha.zero? end