Class SpeechTemplate
- Namespace
- DialogueDown.Playbook.Speech
- Assembly
- DialogueDown.Playbook.dll
Reads a run of speech as words with holes in it, where the queries are the holes.
public static class SpeechTemplate
- Inheritance
-
SpeechTemplate
- Inherited Members
Remarks
A line such as Alice: Hello, cannot be spoken until the world says what
"playerName".playerName is worth, and two questions follow. Which keys must be asked about, and what
does the line say once they are answered? Both are answered here by one walk over the same
fragments, so a key that gets asked about is a hole that gets filled, and the reverse.
A hole is found wherever it sits. A query inside emphasis, a link's label, or an image's alt text is as much a hole as one in plain prose, and filling it leaves the emphasis, the link, and the image exactly where the writer put them.
Methods
- Fill(ImmutableArray<SpeechFragment>, Func<string, string>)
Fills every hole with what the world said, and leaves the rest standing.
- HasKeys(ImmutableArray<SpeechFragment>)
Whether a run of speech asks the world about any key.
- Keys(ImmutableArray<SpeechFragment>)
The keys a run of speech asks the world about, in the order they first appear.
- Segments(ImmutableArray<SpeechFragment>)
Breaks a run of speech into the segments a host works through in turn.