Class: NewGame
Instance Method Summary collapse
-
#initialize(x, y, window) ⇒ NewGame
constructor
A new instance of NewGame.
- #on_enter ⇒ Object
Methods inherited from MenuItem
#button_down, #draw, #select, #unselect
Constructor Details
#initialize(x, y, window) ⇒ NewGame
31 32 33 34 |
# File 'lib/menuitem.rb', line 31 def initialize(x, y, window) super(x, y, window) @text = 'New Game' end |
Instance Method Details
#on_enter ⇒ Object
36 37 38 |
# File 'lib/menuitem.rb', line 36 def on_enter @window.new_game end |