class

PointClickEngine::Characters::Dialogue::DialogTree

Inherits YAML::Serializable < Reference < Object

Dialog tree manager for complex conversations

Constructors

load_from_file(path : String) : DialogTree

Load dialog tree from YAML file

Source
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Source
new(name : String)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

add_node(node : DialogNode)
Source
current_node_id
Source
current_node_id=(current_node_id : String | Nil)
Source
get_current_node
Source
get_variable(key : String) : String | Nil
Source
make_choice(choice_index : Int32)
Source
name
Source
name=(name : String)
Source
nodes
Source
nodes=(nodes : Hash(String, DialogNode))
Source
on_complete
Source
on_complete=(on_complete : Proc(Nil) | Nil)
Source
save_to_file(path : String)

Save dialog tree to YAML file

Source
set_variable(key : String, value : String)
Source
start_conversation(starting_node_id : String)
Source
variables
Source
variables=(variables : Hash(String, String))
Source