LetterTypewriter.RunTypewriter(Markup.MarkupParseResult,CancellationToken)

Method in LetterTypewriter

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

NameDescription
Yarn.Markup.MarkupParseResult lineThe line to display.
System.Threading.CancellationToken cancellationTokenA token that indicates that the typewriter effect should be cancelled.

Returns

A task that completes when the typewriter effect has finished.