Example #1
0
        /// <inheritdoc />
        public override void TraverseToNextNode()
        {
            DialogGraph dialogGraph = (DialogGraph)graph;

            if (Choices.Count > 0)
            {
                TraversableNode choice = GetConnectedNode($"{nameof(Choices)} {dialogGraph.DialogChoice}");

                if (choice != null)
                {
                    choice.TriggerNode();
                }
                else
                {
                    dialogGraph.SignalEndReached();
                }
            }
            else
            {
                TraversableNode exit = GetConnectedNode("Exit");

                if (exit != null)
                {
                    exit.TriggerNode();
                }
                else
                {
                    dialogGraph.SignalEndReached();
                }
            }
        }
Example #2
0
        /// <inheritdoc />
        public override void TriggerNode()
        {
            base.TriggerNode();

            DialogGraph dialogGraph = (DialogGraph)graph;

            dialogGraph.DialogString = Dialog;
        }