Class: GameOver

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

Overview

GAMEOVER GAMESTATE

simple GameOver gamestate

Instance Method Summary collapse

Constructor Details

#initializeGameOver

Returns a new instance of GameOver.



5
6
7
8
# File 'lib/games_paradise/gui/gosu/chinguroids/ending.rb', line 5

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



20
21
22
# File 'lib/games_paradise/gui/gosu/chinguroids/ending.rb', line 20

def pop
  pop_game_state(setup: false)
end

#setupObject

setup



11
12
13
14
15
16
17
# File 'lib/games_paradise/gui/gosu/chinguroids/ending.rb', line 11

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