lib/gamefic/plot.rb in gamefic-2.0.2 vs lib/gamefic/plot.rb in gamefic-2.0.3
- old
+ new
@@ -25,23 +25,17 @@
include Host
include Serialize
exclude_from_serial [:@static]
- # @param structure [Gamefic::Structure]
# @param metadata [Hash]
def initialize metadata: {}
@metadata = metadata
run_scripts
@static = [self] + scene_classes + entities
end
- def player_class cls = nil
- @player_class = cls unless cls.nil?
- @player_class ||= Gamefic::Actor
- end
-
# Get an Array of the Plot's current Syntaxes.
#
# @return [Array<Syntax>]
def syntaxes
playbook.syntaxes
@@ -91,11 +85,11 @@
end
end
end
call_player_update
call_update
- subplots.each { |s| s.update unless s.concluded? }
- subplots.delete_if { |s| s.concluded? }
+ subplots.delete_if(&:concluded?)
+ subplots.each(&:update)
end
# Send a message to a group of entities.
#
# @param entities [Array<Entity>]