Class: GamesAndRpgParadise::GUI::Memory::Game
Constant Summary
collapse
- PROJECT_BASE_DIRECTORY =
#
PROJECT_BASE_DIRECTORY
#
::GamesAndRpgParadise.project_base_directory?
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
Class Method Summary
collapse
-
.fonts ⇒ Object
# ==== Game.fonts ========================================================================= #.
Instance Method Summary
collapse
#gosu_button_down?, #image, #image10?, #image1?, #image2?, #image3?, #image4?, #image5?, #image6?, #image7?, #image8?, #image9?, #on_left_arrow_pressed?, #on_right_arrow_pressed?, #q_means_quit, #set_font, #set_title, #sqrt, #tab_key?, #write_this_text
Constructor Details
#initialize(run_already = true) ⇒ Game
35
36
37
38
39
40
41
42
43
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 35
def initialize(
run_already = true
)
super(SCREENWIDTH, SCREENHEIGHT, {fullscreen: false})
set_title(TITLE)
reset
load_images
run if run_already
end
|
Class Method Details
.fonts ⇒ Object
90
91
92
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 90
def self.fonts
GOSU_USE_THIS_FONT
end
|
Instance Method Details
#best_time=(i) ⇒ Object
113
114
115
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 113
def best_time=(i)
@best_time = i
end
|
#best_time? ⇒ Boolean
Also known as:
best_time
120
121
122
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 120
def best_time?
@best_time
end
|
127
128
129
130
131
132
133
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 127
def button_down(id)
case id
when Gosu::KbEscape $w.close end
::GamesAndRpgParadise::GUI::Memory.current_game.button_down(id)
end
|
76
77
78
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 76
def button_up(id)
::GamesAndRpgParadise::GUI::Memory.current_game.button_up(id)
end
|
#draw ⇒ Object
59
60
61
62
63
64
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 59
def draw
GOSU_USE_THIS_FONT.draw_text('TIME', 380, 10, 1)
GOSU_USE_THIS_FONT.draw_text('BEST', 380, 80, 1)
GOSU_USE_THIS_FONT.draw_text(@best_time, 380, 100, 1)
::GamesAndRpgParadise::GUI::Memory.current_game.draw
end
|
#images? ⇒ Boolean
Also known as:
images
#load_images ⇒ Object
#
load_images
This method will load up the available animals.
#
#needs_cursor? ⇒ Boolean
97
98
99
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 97
def needs_cursor?
true
end
|
#run ⇒ Object
138
139
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 138
def run
end
|
#update ⇒ Object
69
70
71
|
# File 'lib/games_and_rpg_paradise/gui/gosu/memory/game.rb', line 69
def update
::GamesAndRpgParadise::GUI::Memory.current_game.update
end
|