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
permalink #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
permalink #button_down(id) ⇒ Object
[View source]
192 193 194 |
# File 'lib/flonkerton.rb', line 192 def (id) close if id == Gosu::KbEscape # Don't Panic! end |
permalink #button_down?(id) ⇒ Boolean
215 216 217 |
# File 'lib/flonkerton.rb', line 215 def (id) @game.(id) end |
permalink #button_up(id) ⇒ Object
[View source]
190 |
# File 'lib/flonkerton.rb', line 190 def (id); end |
permalink #clip_to(x, y, w, h, &block) ⇒ Object
[View source]
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 |
permalink #close ⇒ Object
[View source]
219 220 221 |
# File 'lib/flonkerton.rb', line 219 def close @game.close end |
permalink #go_to(screen) ⇒ Object
[View source]
223 224 225 |
# File 'lib/flonkerton.rb', line 223 def go_to(screen) @game.next_screen = screen end |
permalink #height ⇒ Object
[View source]
203 204 205 |
# File 'lib/flonkerton.rb', line 203 def height @game.height end |
permalink #mouse_x ⇒ Object
[View source]
207 208 209 |
# File 'lib/flonkerton.rb', line 207 def mouse_x @game.mouse_x end |
permalink #mouse_y ⇒ Object
[View source]
211 212 213 |
# File 'lib/flonkerton.rb', line 211 def mouse_y @game.mouse_y end |
permalink #params ⇒ Object
[View source]
227 228 229 |
# File 'lib/flonkerton.rb', line 227 def params @game.params end |
permalink #width ⇒ Object
[View source]
199 200 201 |
# File 'lib/flonkerton.rb', line 199 def width @game.width end |