Class: OpeningCredits

Inherits:
Chingu::GameState
  • Object
show all
Defined in:
lib/games_paradise/gui/gosu/chinguroids/beginning.rb

Overview

OPENING CREDITS GAMESTATE

Gosu  with animated highlights

Instance Method Summary collapse

Instance Method Details

#drawObject



68
69
70
71
# File 'lib/games_paradise/gui/gosu/chinguroids/beginning.rb', line 68

def draw
  Image["../media/assets/gosu-logo.png"].draw(0, 0, 0)
  super
end

#introObject

pressing ‘enter’ skips ahead to the Introduction



64
65
66
# File 'lib/games_paradise/gui/gosu/chinguroids/beginning.rb', line 64

def intro # pressing 'enter' skips ahead to the Introduction
  push_game_state(Chingu::GameStates::FadeTo.new(Introduction.new, :speed => 11))
end

#setupObject



54
55
56
57
58
59
60
61
62
# File 'lib/games_paradise/gui/gosu/chinguroids/beginning.rb', line 54

def setup
  self.input = { :esc => :exit, [:enter, :return] => :intro, :p => Pause, :r => lambda{current_game_state.setup} }
  @beam = Highlight.create(:x => 66, :y => 300)  # Highlights are defined in objects.rb
  @beam2 = Highlight2.create(:x => 0, :y => 300)
  @beam3 = Highlight.create(:x => -500, :y => 300)
  after (3900) {
    push_game_state(Chingu::GameStates::FadeTo.new(OpeningCredits2.new, :speed => 8))
  }
end