Class: GamesAndRpgParadise::GUI::Foobar
- Inherits:
-
Gosu::Window
show all
- Defined in:
- lib/games_and_rpg_paradise/games/prototypes/gosu_prototype.rb
Overview
GamesAndRpgParadise::GUI::Foobar
Constant Summary
collapse
- NAMESPACE =
inspect
- WIDTH =
1200
- HEIGHT =
480
- TITLE =
'GOSU Prototype'
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) ⇒ Foobar
38
39
40
41
42
43
44
45
|
# File 'lib/games_and_rpg_paradise/games/prototypes/gosu_prototype.rb', line 38
def initialize(
run_already = true
)
super(WIDTH, HEIGHT)
set_title(TITLE)
reset
run if run_already
end
|
Instance Method Details
65
66
67
68
69
70
71
|
# File 'lib/games_and_rpg_paradise/games/prototypes/gosu_prototype.rb', line 65
def button_down(id = nil)
case id
when Gosu::KbEscape,
Gosu::KbQ
close
end
end
|
#reset ⇒ Object
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/games_and_rpg_paradise/games/prototypes/gosu_prototype.rb', line 50
def reset
@song = Gosu::Song.new('alert2.mp3')
@song.play
@font = set_font(:hack_30)
end
|
#run ⇒ Object
76
77
78
|
# File 'lib/games_and_rpg_paradise/games/prototypes/gosu_prototype.rb', line 76
def run
exit_on_q
end
|