Class: Graphics::GameOver

Inherits:
Object
  • Object
show all
Defined in:
lib/games_paradise/flappy_bird/ruby2d/graphics/game_over.rb,
lib/games_paradise/flappy_bird/ruby2d/graphics/game_over/title.rb

Defined Under Namespace

Classes: Title

Instance Method Summary collapse

Constructor Details

#initializeGameOver

#

initialize

#


16
17
18
# File 'lib/games_paradise/flappy_bird/ruby2d/graphics/game_over.rb', line 16

def initialize
  @title = Title.new
end

Instance Method Details

#update!(game) ⇒ Object

#

update!

#


23
24
25
26
27
28
29
# File 'lib/games_paradise/flappy_bird/ruby2d/graphics/game_over.rb', line 23

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