Class: Flonkerton::Screen
- Inherits:
-
Object
- Object
- Flonkerton::Screen
- Defined in:
- lib/flonkerton.rb
Overview
This class shouldn’t be instantiated, it provides behavior for subclasses.
Direct Known Subclasses
Instance Method Summary collapse
- #button_down(id) ⇒ Object
- #button_down?(id) ⇒ Boolean
- #button_up(id) ⇒ Object
- #clip_to(x, y, w, h, &block) ⇒ Object
- #close ⇒ Object
- #draw ⇒ Object
- #go_to(screen) ⇒ Object
- #height ⇒ Object
-
#initialize(game) ⇒ Screen
constructor
A new instance of Screen.
- #mouse_x ⇒ Object
- #mouse_y ⇒ Object
- #params ⇒ Object
- #setup ⇒ Object
- #update ⇒ Object
- #width ⇒ Object
Constructor Details
#initialize(game) ⇒ Screen
Returns a new instance of Screen.
184 185 186 187 |
# File 'lib/flonkerton.rb', line 184 def initialize game @game = game setup end |
Instance Method Details
#button_down(id) ⇒ Object
192 193 194 |
# File 'lib/flonkerton.rb', line 192 def (id) close if id == Gosu::KbEscape # Don't Panic! end |
#button_down?(id) ⇒ Boolean
215 216 217 |
# File 'lib/flonkerton.rb', line 215 def (id) @game.(id) end |
#button_up(id) ⇒ Object
190 |
# File 'lib/flonkerton.rb', line 190 def (id); end |
#clip_to(x, y, w, h, &block) ⇒ Object
231 232 233 |
# File 'lib/flonkerton.rb', line 231 def clip_to(x, y, w, h, &block) @game.clip_to(x, y, w, h, &block) end |
#close ⇒ Object
219 220 221 |
# File 'lib/flonkerton.rb', line 219 def close @game.close end |
#draw ⇒ Object
197 |
# File 'lib/flonkerton.rb', line 197 def draw; end |
#go_to(screen) ⇒ Object
223 224 225 |
# File 'lib/flonkerton.rb', line 223 def go_to(screen) @game.next_screen = screen end |
#height ⇒ Object
203 204 205 |
# File 'lib/flonkerton.rb', line 203 def height @game.height end |
#mouse_x ⇒ Object
207 208 209 |
# File 'lib/flonkerton.rb', line 207 def mouse_x @game.mouse_x end |
#mouse_y ⇒ Object
211 212 213 |
# File 'lib/flonkerton.rb', line 211 def mouse_y @game.mouse_y end |
#params ⇒ Object
227 228 229 |
# File 'lib/flonkerton.rb', line 227 def params @game.params end |
#setup ⇒ Object
189 |
# File 'lib/flonkerton.rb', line 189 def setup; end |
#update ⇒ Object
196 |
# File 'lib/flonkerton.rb', line 196 def update; end |
#width ⇒ Object
199 200 201 |
# File 'lib/flonkerton.rb', line 199 def width @game.width end |