Class: Gamefic::Scene::MultipleScene

Inherits:
MultipleChoice show all
Defined in:
lib/gamefic/scene/multiple_scene.rb

Instance Attribute Summary

Attributes inherited from MultipleChoice

#index, #invalid_message, #number, #selection

Attributes inherited from Base

#actor, #input, #prompt, #type

Instance Method Summary collapse

Methods inherited from MultipleChoice

#options, #post_initialize, #state

Methods inherited from Base

#finished?, #flush, #initialize, #on_finish, on_start, #post_initialize, #start, start_block, #state, subclass, #update

Constructor Details

This class inherits a constructor from Gamefic::Scene::Base

Instance Method Details

#finishObject



13
14
15
16
17
18
# File 'lib/gamefic/scene/multiple_scene.rb', line 13

def finish
  get_choice
  unless selection.nil?
    actor.prepare option_map[selection]
  end
end

#map(option, scene) ⇒ Object



8
9
10
11
# File 'lib/gamefic/scene/multiple_scene.rb', line 8

def map option, scene
  options.push option
  option_map[option] = scene
end

#option_mapObject



4
5
6
# File 'lib/gamefic/scene/multiple_scene.rb', line 4

def option_map
  @option_map ||= {}
end