Esempio n. 1
0
        public void OnClick()
        {
            ((DecisionNode)DialogManager.GetCurrentNode()).Decide(Decision, DialogManager.GraphEngine);
            PlayerCharacter player = GameManager.Player;

            if (DialogManager.IsDialogFinished())
            {
                player.EndInteraction();
            }
        }
Esempio n. 2
0
        //---------------------------------------------------------------------
        // Decision Making
        //---------------------------------------------------------------------

        /// <summary>
        /// If the next node is a decision node, then this will display those
        /// decisions to the user.
        /// </summary>
        private void TryListDecisions()
        {
            var node = DialogManager.GetCurrentNode();

            if (node != null)
            {
                node = node.GetNextNode();

                if (node is DecisionNode decisions)
                {
                    ListDecisions(decisions);
                    DialogManager.SetCurrentNode(node);
                }
                else
                {
                    DialogManager.SetCurrentNode(node, false);
                }
            }
        }