Class: Ending3
- Inherits:
-
Chingu::GameState
- Object
- Chingu::GameState
- Ending3
- Defined in:
- lib/games_and_rpg_paradise/gui/gosu/chinguroids/ending.rb
Overview
ENDING3 GAMESTATE
the end of the end - massive celebration
Instance Method Summary collapse
-
#create_characters ⇒ Object
creates 15 characters (one of each) each time it is called.
- #draw ⇒ Object
- #setup ⇒ Object
Instance Method Details
#create_characters ⇒ Object
creates 15 characters (one of each) each time it is called
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/ending.rb', line 212 def create_characters # creates 15 characters (one of each) each time it is called Char1.create # Chars are defined in characters.rb Char2.create Char3.create Char4.create Char5.create Char6.create Char7.create Char8.create Char9.create Char10.create Char11.create Char12.create Char13.create Char14.create Char15.create end |
#draw ⇒ Object
230 231 232 233 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/ending.rb', line 230 def draw Image["../media/assets/end_background.png"].draw(0, 0, 0) # Background Image super end |
#setup ⇒ Object
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/ending.rb', line 189 def setup self.input = { :esc => :exit, [:enter, :return] => EndCredits, :p => Pause, :r => lambda{current_game_state.setup} } @spire = Spire.create(:x => 490, :y => 80, :factor => 0.7, :zorder => 250) @knight = EndKnight.create(:x => 1040, :y => 505, :factor => 1.4, :zorder => 600) @multitude = Crowd.create(:x=>400,:y=>150) # creates a multitude in the background # EndKnight and Crowd are defined in characters.rb; Spire is defined in objects.rb @cheering1 = Sound["media/audio/huge_crowd.ogg"] @cheering2 = Sound["media/audio/huge_crowd_roar.ogg"] 200.times { create_characters } # creates a multitude in the foreground after(50) { @cheering1.play(0.4) } # scripts to create crowd noise after(6000) { @cheering2.play(0.4) } after(9000) { @cheering2.play(0.5) } after(13000) { @cheering2.play(0.6) } after(15500) { @cheering1.play(0.5) } after(16500) { @cheering2.play(0.5) } after(19500) { @cheering2.play(0.3) } after(21500) { push_game_state(Chingu::GameStates::FadeTo.new(EndCredits.new, :speed => 10)) } end |