Class: GamesAndRpgParadise::GUI::Memory::GameEnded
- Inherits:
-
Object
- Object
- GamesAndRpgParadise::GUI::Memory::GameEnded
- Includes:
- GamesAndRpgParadise::GUI::Memory
- Defined in:
- lib/games_and_rpg_paradise/gui/gosu/memory/game_ended.rb
Overview
GamesAndRpgParadise::GUI::Memory::GameEnded
Constant Summary
Constants included from GamesAndRpgParadise::GUI::Memory
Constants included from Memory
Memory::ARRAY_IMAGES_FOR_THE_MEMORY_GAME, Memory::FILE_BLACK_BACKGROUND, Memory::FILE_CAMEL_HEAD, Memory::FILE_CARD_RANDOM, Memory::FILE_DONKEY, Memory::FILE_FROG, Memory::FILE_LION, Memory::FILE_NEW_GAME, Memory::FILE_OCTOPUS, Memory::FILE_SAD_CRAB, Memory::FILE_SHEEP, Memory::FILE_SNAIL, Memory::FILE_SPERM_WHALE, Memory::FILE_UNICORN, Memory::GAME_MESSAGE_YOU_WON, Memory::IMAGES_DIRECTORY, Memory::SCREENHEIGHT, Memory::SCREENWIDTH, Memory::TITLE, Memory::USE_THIS_FONT_FAMILY
Instance Method Summary collapse
-
#button_down(id) ⇒ Object
# === button_down ========================================================================= #.
-
#button_up(id) ⇒ Object
# === button_up ========================================================================= #.
-
#draw ⇒ Object
# === draw ========================================================================= #.
-
#initialize(parent) ⇒ GameEnded
constructor
# === initialize ========================================================================= #.
-
#reset ⇒ Object
# === reset ========================================================================= #.
-
#show_the_you_won_message ⇒ Object
# === show_the_you_won_message ========================================================================= #.
-
#update ⇒ Object
# === update ========================================================================= #.
Methods included from GamesAndRpgParadise::GUI::Memory
available_images?, current_game=, current_game?, load_images
Constructor Details
#initialize(parent) ⇒ GameEnded
#
initialize
#
27 28 29 30 |
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game_ended.rb', line 27 def initialize(parent) @parent = parent reset end |
Instance Method Details
#button_down(id) ⇒ Object
#
button_down
#
85 86 |
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game_ended.rb', line 85 def (id) end |
#button_up(id) ⇒ Object
#
button_up
#
91 92 93 94 95 96 97 98 |
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game_ended.rb', line 91 def (id) if (@parent.mouse_x > 345 && @parent.mouse_x < 345+128 && @parent.mouse_y > 220 && @parent.mouse_y < 220+28) ::GamesAndRpgParadise::GUI::Memory.current_game = PlayGame.new end end |
#draw ⇒ Object
#
draw
#
49 50 51 52 53 54 55 |
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game_ended.rb', line 49 def draw # ======================================================================= # # Display the play-again button as well. # ======================================================================= # @button_play_again.draw(345, 220, 1) end |
#reset ⇒ Object
#
reset
#
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game_ended.rb', line 35 def reset # ======================================================================= # # === @font # ======================================================================= # @font = GOSU_USE_THIS_FONT # ======================================================================= # # === @button_play_again # ======================================================================= # @button_play_again = ::GamesAndRpgParadise::GUI::Memory.available_images?['button_play_again'] end |
#show_the_you_won_message ⇒ Object
#
show_the_you_won_message
#
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game_ended.rb', line 60 def # ======================================================================= # # Draw the "you won the game" message next. # The parameters to draw_text() are x, y, z and scale. # ======================================================================= # @font.text( GAME_MESSAGE_YOU_WON, 80, # x 110, # y 1, # z 1.5, # scale-x 1.5, # scale-y :steelblue # colour to use here. ) end |
#update ⇒ Object
#
update
#
79 80 |
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game_ended.rb', line 79 def update end |