Example #1
0
        private void InputAnswer(PlayerCharacter player, NPC talkPartner)
        {
            Console.ForegroundColor = ConsoleColor.Gray;
            Console.Write("Type in a number for your answer: ");
            string input = Console.ReadLine();

            try
            {
                DialogNode nextDialog = _dialogChildren[Convert.ToInt32(input) - 1];
                nextDialog.UseDialogNode(player, talkPartner);
            }
            catch
            {
                Console.WriteLine("ERROR: Not a valid Answer - try again");
                UseDialogNode(player, talkPartner);
            }
        }
Example #2
0
 public void AddDialogNode(DialogNode dialogNode) => _dialog = dialogNode;
Example #3
0
 public void AddDialogChild(DialogNode dialogNode) => _dialogChildren.Add(dialogNode);