Class: Petli::Stages::Main
- Inherits:
-
Base
- Object
- Tatty::Stage
- Base
- Petli::Stages::Main
- Defined in:
- lib/petli/stages/main.rb
Constant Summary
Constants inherited from Base
Base::GAME_HEIGHT, Base::GAME_WIDTH
Instance Attribute Summary
Attributes inherited from Tatty::Stage
Instance Method Summary collapse
Methods inherited from Base
#action_bar, #action_pages, #draw, #initialize, #keypress, #left, #top
Methods inherited from Tatty::Stage
#draw, #goto, #initialize, #keypress, #leave, #move_to, #render, #render_at, #render_box, #screen_height, #screen_size, #screen_width, #step
Constructor Details
This class inherits a constructor from Petli::Stages::Base
Instance Method Details
#actions ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/petli/stages/main.rb', line 4 def actions return {light: -> {@pet.light_switch}} if @pet.lights_out acts = { play: -> {goto(Play, pet: @pet)}, feed: -> {goto(Feed, pet: @pet)}, light: -> {@pet.light_switch}, } acts[:clean] = -> {@pet.clean} if @pet.poops.count > 0 acts end |