lib/gamefic/scene/pause.rb in gamefic-1.3.2 vs lib/gamefic/scene/pause.rb in gamefic-1.4.0
- old
+ new
@@ -1,24 +1,13 @@
module Gamefic
- # Wait for input. After the scene is finished (e.g., the player presses
- # Enter), the :active scene will be cued if no other scene has been prepared
- # or cued.
+ # Pause for user input.
#
class Scene::Pause < Scene::Custom
- def initialize prompt = nil, &block
- @prompt = prompt
- @start = block
- end
def start actor
- @start_scene = actor.scene
- super
- end
- def finish actor, input
- actor.cue :active if (actor.scene == @start_scene and actor.next_scene.nil?)
- end
- def prompt
- @prompt ||= "Press Enter to continue..."
+ data = start_data_for(actor)
+ data.prompt = 'Press enter to continue...'
+ do_start_block actor, data
end
end
end