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, #input, #prompt, #type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#finished?, #flush, #initialize, #on_finish, on_start, #start, start_block, #state, subclass, #update
Constructor Details
This class inherits a constructor from Gamefic::Scene::Base
Class Method Details
.type ⇒ Object
20 21 22 |
# File 'lib/gamefic/scene/activity.rb', line 20 def type 'Activity' end |
Instance Method Details
#finish ⇒ Object
12 13 14 15 16 17 |
# File 'lib/gamefic/scene/activity.rb', line 12 def finish super o = nil o = actor.perform input.strip unless input.to_s.strip.empty? actor.performed o end |
#post_initialize ⇒ Object
8 9 10 |
# File 'lib/gamefic/scene/activity.rb', line 8 def post_initialize self.type = 'Activity' end |