Dialogue

Class in Yarn

Inherits from System.Object

Summary

Co-ordinates the execution of Yarn programs.

public class Dialogue : ISmartVariableEvaluator

Constructors

NameDescription
Dialogue(Yarn.IVariableStorage)Initializes a new instance of the Dialogue class.

Fields

NameDescription
DefaultStartNodeNameThe node that execution will start from.
NoOptionSelectedThe value to indicate to the dialogue runner that no option was selected and dialogue should fallthrough to the rest of the program.

Methods

NameDescription
Continue()Starts, or continues, execution of the current Program.
GetHeaders(string)Gets the collection of headers present on the node named nodeName .
GetHeaderValue(string,string)Gets the value of the header named headerName on the node named nodeName , or null if the header can’t be found.
GetSaliencyOptionsForNodeGroup(string)Queries the Dialogue for what content could possibly run if the node group nodeGroup was run.
GetStringIDForNode(string)Returns the string ID that contains the original, uncompiled source text for a node.
GetTagsForNode(string)Returns the tags for the node nodeName .
HasSalientContent(string)Returns if the node group has any potential nodes to be run based on the current salient selector.
IsNodeGroup(string)Gets a value indicating whether nodeName is the name of a valid node group in the program.
NodeExists(string)Gets a value indicating whether a specified node exists in the Program.
SetNode(string)Prepares the Dialogue that the user intends to start running a node.
SetProgram(Program)Loads all nodes from the provided Program .
SetSelectedOption(int)Signals to the Dialogue that the user has selected a specified Option .
SignalContentComplete()Signals that the currently running content has completed synchronously.
Stop()Immediately stops the Dialogue .
TryGetSmartVariable(string,T)Evaluate the value of a smart variable named name .
UnloadAll()Unloads all nodes from the Dialogue.

Properties

NameDescription
CommandHandlerGets or sets the CommandHandler that is called when a command is to be delivered to the game.
ContentSaliencyStrategyGets or sets the content saliency strategy used by this Dialogue .
CurrentNodeGets the name of the node that this Dialogue is currently executing.
DialogueCompleteHandlerGets or sets the DialogueCompleteHandler that is called when the dialogue reaches its end.
IsActiveGets a value indicating whether the Dialogue is currently executing Yarn instructions.
LibraryGets the Library that this Dialogue uses to locate functions.
LineHandlerGets or sets the LineHandler that is called when a line is ready to be shown to the user.
LogDebugMessageInvoked when the Dialogue needs to report debugging information.
LogErrorMessageInvoked when the Dialogue needs to report an error.
NodeCompleteHandlerGets or sets the NodeCompleteHandler that is called when a node is complete.
NodeNamesGets the names of the nodes in the currently loaded Program.
NodeStartHandlerGets or sets the NodeStartHandler that is called when a node is started.
OptionsHandlerGets or sets the OptionsHandler that is called when a set of options are ready to be shown to the user.
PrepareForLinesHandlerGets or sets the PrepareForLinesHandler that is called when the dialogue anticipates delivering some lines.
VariableStorageGets or sets the object that provides access to storing and retrieving the values of variables.