Class: OpeningCredits2
- Inherits:
-
Chingu::GameState
- Object
- Chingu::GameState
- OpeningCredits2
- Defined in:
- lib/games_paradise/gui/gosu/chinguroids/beginning.rb
Overview
OPENING CREDITS 2 GAMESTATE
Ruby logo with animated sparkle
Instance Method Summary collapse
- #draw ⇒ Object
-
#intro ⇒ Object
pressing ‘enter’ skips ahead to the Introduction.
- #setup ⇒ Object
Instance Method Details
#draw ⇒ Object
103 104 105 106 |
# File 'lib/games_paradise/gui/gosu/chinguroids/beginning.rb', line 103 def draw Image["../media/assets/ruby-logo.png"].draw(0, 0, 0) super end |
#intro ⇒ Object
pressing ‘enter’ skips ahead to the Introduction
99 100 101 |
# File 'lib/games_paradise/gui/gosu/chinguroids/beginning.rb', line 99 def intro # pressing 'enter' skips ahead to the Introduction push_game_state(Chingu::GameStates::FadeTo.new(Introduction.new, :speed => 11)) end |
#setup ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/games_paradise/gui/gosu/chinguroids/beginning.rb', line 79 def setup self.input = { :esc => :exit, [:enter, :return] => :intro, :p => Pause, :r => lambda{current_game_state.setup} } Sparkle.destroy_all @sparkle = Sparkle.create(:x => 373, :y => 301, :zorder => 20) # Sparkle is defined in objects.rb after(20) { # make the sparkle grow and turn, then stop turning @sparkle.turnify1 # turnify methods are defined in Sparkle class in objects.rb after(100) { @sparkle.turnify2 after(400) { @sparkle.turnify3 after(400) { @sparkle.turnify4 after(400) { @sparkle.turnify5 after(400) { @sparkle.turnify6 } } } } } } after (2400) { push_game_state(Chingu::GameStates::FadeTo.new(Introduction.new, :speed => 8)) } end |