DialogueNode
A class that represents a dialogue tree node structure for conversational paths.
ClassRLPlugins API
public class DialogueNodeMembers
Methods
- DialogueNodeget()
Creates a new instance of a DialogueNode.
- DialogueNodeget(Object[])
Creates a new instance of a DialogueNode with the given options.
- DialogueNodenode(Object...)
Adds a new node to the dialogue tree.
- voidprocess()
Processes the dialogue tree (blocking).
- booleanprocessStep()
Processes one step of the dialogue tree for state machine usage.
- voidreset()
Resets the state machine for reuse.
- StringtoString()
A text form, for log lines.
get()static
public static DialogueNode get()Creates a new instance of a DialogueNode.
Returns
A new instance of a DialogueNode.
get(Object[])static
public static DialogueNode get(Object[] options)Creates a new instance of a DialogueNode with the given options.
Parameters
options- The options to add to the DialogueNode.
Returns
A new instance of a DialogueNode with the given options.
node(Object...)
public DialogueNode node(Object... options)Adds a new node to the dialogue tree.
Parameters
options- The options to add to the dialogue tree.
Returns
The current instance of the DialogueNode.
process()
public void process()Processes the dialogue tree (blocking).
- Can wait for the game. Call it only from
VitaPlugin.loop(); in a@Subscribemethod it freezes the game.
processStep()
public boolean processStep()Processes one step of the dialogue tree for state machine usage.
Call repeatedly until it returns false.
Usage:
Returns
True if processing should continue (call again next tick), false when complete or failed.
reset()
public void reset()Resets the state machine for reuse.
Call this before using processStep() on a DialogueNode instance.
toString()
public String toString()A text form, for log lines.
Also allowed
Every class has these, as in plain Java.
equals