Class: GameOver

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

Overview

GAMEOVER GAMESTATE

simple GameOver gamestate

Instance Method Summary collapse

Constructor Details

#initializeGameOver

initialize



7
8
9
10
11
12
13
14
15
16
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/ending.rb', line 7

def initialize
  super
  self.input = {
    :esc => :exit,
    [:enter, :return] => Introduction,
    :p => Pause,
    :r => lambda{current_game_state.setup},
    [:q, :l] => :pop
  }
end

Instance Method Details

#popObject

pop



28
29
30
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/ending.rb', line 28

def pop
  pop_game_state(setup: false)
end

#setupObject

setup



19
20
21
22
23
24
25
# File 'lib/games_and_rpg_paradise/gui/gosu/chinguroids/ending.rb', line 19

def setup
  @t2 = Chingu::Text.create(:text=>"Game Over", :y=>280, :size=>28)
  @t2.x = 400 - @t2.width/2
  @t3 = Chingu::Text.create(:text=>"Press enter", :y=>380, :size=>28)
  @t3.x = 400 - @t2.width/2
  $window.caption = "Game Over"
end