Class: GamesAndRpgParadise::Graphics::GameOver

Inherits:
Object
  • Object
show all
Defined in:
lib/games_and_rpg_paradise/games/flappy_bird/ruby2d/graphics/game_over.rb

Instance Method Summary collapse

Constructor Details

#initializeGameOver

#

initialize

#


18
19
20
# File 'lib/games_and_rpg_paradise/games/flappy_bird/ruby2d/graphics/game_over.rb', line 18

def initialize
  @title = Title.new
end

Instance Method Details

#update!(game) ⇒ Object

#

update!

#


25
26
27
28
29
30
31
# File 'lib/games_and_rpg_paradise/games/flappy_bird/ruby2d/graphics/game_over.rb', line 25

def update!(game)
  if game.over?
    @title.show!
  else
    @title.hide!
  end
end