Class: Warp
- Inherits:
-
Chingu::GameObject
- Object
- Chingu::GameObject
- Warp
- Defined in:
- lib/prkwars/warp.rb
Overview
Class holding the warp effect used whenever an enemy game object spawns somewhere.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Warp
constructor
A new instance of Warp.
- #update ⇒ Object
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( = {}) super() @fade_rate = -8 @image = Image['media/warp.png'] end |
Instance Method Details
#update ⇒ Object
15 16 17 |
# File 'lib/prkwars/warp.rb', line 15 def update destroy! if color.alpha.zero? end |