Class: Gamefic::Scene::Activity
- Defined in:
- lib/gamefic/scene/activity.rb
Overview
Active Scenes handle the default command prompt, where input is parsed into an Action performed by the Character. This is the default scene in a Plot.
Instance Attribute Summary
Attributes inherited from Base
#actor, #data, #input, #prompt, #type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#[], #finished?, #initialize, #on_finish, on_start, #start, start_block, #state, subclass, #tracked=, #tracked?, tracked?, #update
Constructor Details
This class inherits a constructor from Gamefic::Scene::Base
Class Method Details
.type ⇒ Object
19 20 21 |
# File 'lib/gamefic/scene/activity.rb', line 19 def type 'Activity' end |
Instance Method Details
#finish ⇒ Object
11 12 13 14 15 16 |
# File 'lib/gamefic/scene/activity.rb', line 11 def finish super o = nil o = actor.perform input.strip unless input.to_s.strip.empty? actor.performed o end |
#post_initialize ⇒ Object
7 8 9 |
# File 'lib/gamefic/scene/activity.rb', line 7 def post_initialize self.type = 'Activity' end |