Class: OpeningCredits

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

Overview

OPENING CREDITS GAMESTATE

Gosu  with animated highlights

Instance Method Summary collapse

Instance Method Details

#drawObject

draw



80
81
82
83
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/beginning.rb', line 80

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

#introObject

pressing ‘enter’ skips ahead to the Introduction



75
76
77
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/beginning.rb', line 75

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

#setupObject

setup



60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/beginning.rb', line 60

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