Class: GameOver
- Inherits:
-
Chingu::GameState
- Object
- Chingu::GameState
- GameOver
- Defined in:
- lib/games_paradise/gui/gosu/chinguroids/ending.rb
Overview
GAMEOVER GAMESTATE
simple GameOver gamestate
Instance Method Summary collapse
-
#initialize ⇒ GameOver
constructor
A new instance of GameOver.
-
#pop ⇒ Object
pop.
-
#setup ⇒ Object
setup.
Constructor Details
#initialize ⇒ GameOver
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
#pop ⇒ Object
pop
20 21 22 |
# File 'lib/games_paradise/gui/gosu/chinguroids/ending.rb', line 20 def pop pop_game_state(setup: false) end |
#setup ⇒ Object
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 |