InstantTypewriter.RunTypewriter(Markup.MarkupParseResult,CancellationToken)
Method in InstantTypewriter
Summary
Displays the contents of a line over time.
public async YarnTask RunTypewriter(Markup.MarkupParseResult line, CancellationToken cancellationToken)Remarks
This method is called when a dialogue presenter wants to deliver a line's text. The typewriter should present the text to the user; it may take as long as it needs to do so.
If cancellationToken's System.Threading.CancellationToken.IsCancellationRequested becomes true, the
typewriter effect should end early and present the entire contents
of line.
Parameters
| Name | Description |
|---|---|
| Yarn.Markup.MarkupParseResult line | The line to display. |
System.Threading.CancellationToken cancellationToken | A token that indicates that the typewriter effect should be cancelled. |
Returns
A task that completes when the typewriter effect has finished.