Class: GamesAndRpgParadise::Explosion
- Inherits:
-
Chingu::GameObject
- Object
- Chingu::GameObject
- GamesAndRpgParadise::Explosion
- Defined in:
- lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb
Overview
EXPLOSION
called in levels.rb when meteors are destroyed and when player dies
Instance Method Summary collapse
- #setup ⇒ Object
-
#update ⇒ Object
@animation = Chingu::Animation.new(:file => “media/assets/explosion.png”, :delay => 5).
Instance Method Details
#setup ⇒ Object
135 136 137 138 139 140 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb', line 135 def setup @ex1, @ex2, @ex3, @ex4, @ex5, @ex6, @ex7, @ex8, @ex9, @ex10, @ex11= *Image.load_tiles($window, "media/assets/explosion.png", 100, 100, false) @image = @ex1 # @animation = Chingu::Animation.new(:file => "media/assets/explosion.png", :delay => 5) end |
#update ⇒ Object
@animation = Chingu::Animation.new(:file => “media/assets/explosion.png”, :delay => 5)
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/objects.rb', line 141 def update if @image == @ex1 @image = @ex2 elsif @image == @ex2 @image = @ex3 elsif @image == @ex3 @image = @ex4 elsif @image == @ex4 @image = @ex5 elsif @image == @ex5 @image = @ex6 elsif @image == @ex6 @image = @ex7 elsif @image == @ex7 @image = @ex8 elsif @image == @ex8 @image = @ex9 elsif @image == @ex9 @image = @ex10 elsif @image == @ex10 @image = @ex11 elsif @image == @ex11 self.destroy end # @image = @animation.next end |