Class: Asteroids::GameWindow
- Inherits:
-
Gosu::Window
- Object
- Gosu::Window
- Asteroids::GameWindow
- Defined in:
- lib/asteroids.rb
Instance Attribute Summary collapse
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
- #button_down(id) ⇒ Object
- #draw ⇒ Object
-
#initialize ⇒ GameWindow
constructor
A new instance of GameWindow.
- #needs_redraw? ⇒ Boolean
- #update ⇒ Object
Constructor Details
#initialize ⇒ GameWindow
Returns a new instance of GameWindow.
6 7 8 9 |
# File 'lib/asteroids.rb', line 6 def initialize super(800, 600, false) self.caption = 'Asteroids' end |
Instance Attribute Details
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/asteroids.rb', line 4 def state @state end |
Instance Method Details
#button_down(id) ⇒ Object
23 24 25 |
# File 'lib/asteroids.rb', line 23 def (id) @state.(id) end |
#draw ⇒ Object
15 16 17 |
# File 'lib/asteroids.rb', line 15 def draw @state.draw end |
#needs_redraw? ⇒ Boolean
19 20 21 |
# File 'lib/asteroids.rb', line 19 def needs_redraw? @state.needs_redraw? end |
#update ⇒ Object
11 12 13 |
# File 'lib/asteroids.rb', line 11 def update @state.update end |