Dialogue
⚙️ Dialogue Class
The runtime version of a DialogueGraph.
Namespace:
Esper.FeelSpeak.GraphType:class
📦 Fields
public
dialogueGraph
DialogueGraph
The dialogue graph that this has been loaded. Use Prepare to load a graph.
public
nodes
Dictionary<int, Node>
A list of all nodes. This is populated when Prepare is called.
public
startingNode
Node
The node that the dialogue always starts with.
public
currentNode
Node
The current node.
public
previousNode
Node
The previous node.
public
started
bool
If the dialogue has started (if Next was called at least once).
🔍 Static Events
public
onDialogueNodeTriggered
UnityEvent<DialogueNode>
A callback for when any dialogue node in any dialogue is triggered.
public
onChoiceNodeTriggered
UnityEvent<ChoiceNode>
A callback for when any choice node in any dialogue is triggered.
public
onDelayNodeTriggered
UnityEvent<DelayNode>
A callback for when any delay node in any dialogue is triggered.
public
onSoundNodeTriggered
UnityEvent<SoundNode>
A callback for when any sound node in any dialogue is triggered.
public
onActionNodeTriggered
UnityEvent<ActionNode>
A callback for when any action node in any dialogue is triggered.
public
onBooleanNodeTriggered
UnityEvent<BooleanNode>
A callback for when any boolean node in any dialogue is triggered.
public
onNestNodeTriggered
UnityEvent<NestNode>
A callback for when any nest node in any dialogue is triggered.
public
onChoiceMade
UnityEvent<Choice>
A callback for when any choice is made.
🔍 Static Properties
public
dialogueStack
Stack<Dialogue>
The nested dialogue stack.
public
Current
Dialogue
The current dialogue.
🧰 Methods
public
Dialogue(DialogueGraph)
-
Constructor that initializes the dialogue with a dialogue graph.
public
IsDialogueNested()
bool
Checks if the current dialogue is nested.
public
Prepare(bool)
bool
Prepares the dialogue. Preparation is required before the dialogue can be used.
public
PrepareAsync(bool)
Task<bool>
Asynchronously prepares the dialogue. Preparation is required before the dialogue can be used.
public
ReadNext(int?)
Node
Gets the next node based on the properties and connections of the current node without updating currentNode.
public
Next(int?)
Node
Gets the next node based on the properties and connections of the current node and updates currentNode.
protected
Next(int?, ref Node, bool)
Node
Gets the next node based on the properties and connections of the current node with read-only mode option.
Last updated