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); } }
public void AddDialogNode(DialogNode dialogNode) => _dialog = dialogNode;
public void AddDialogChild(DialogNode dialogNode) => _dialogChildren.Add(dialogNode);