/// <summary>
        /// Initializes the dialog parser with the first Mission. There is always min 1 Mission
        /// </summary>
        private void InitializeDialogParser()
        {
            dialogParser           = new DialogParserFertigkeiten();
            dialogParser.StartNode = new DialogNode <object>();
            Mission mission = npcDialogs.missionen[0];

            dialogParser.StartNode.nodeElement           = mission;
            dialogParser.StartNode.typeNodeElement       = typeof(Mission);
            dialogParser.StartNode.typeParentNodeElement = null;
            dialogParser.StartNode.parentNode            = null;
        }
Exemple #2
0
        /// <summary>
        /// Liefert die Optionen (Auswahlmöglichkeiten) als Liste von strings
        /// </summary>
        /// <returns>The next options.</returns>
        public static List <string> FormatOptions(DialogParser dialogParser)
        {
            List <string> optionStrings             = new List <string>();
            List <DialogNode <object> > optionNodes = dialogParser.optionalStartNodes;

            foreach (var optionNode in optionNodes)
            {
                Option nodeElement = optionNode.nodeElement as Option;
                optionStrings.Add(nodeElement.Beschreibung);
            }

            return(optionStrings);
        }
Exemple #3
0
 /// <summary>
 /// Checks whether Dialog isOption
 /// </summary>
 /// <returns><c>true</c>, if dialog option was nexted, <c>false</c> otherwise.</returns>
 public static bool NextDialogOption(DialogParser dialogParser)
 {
     return(dialogParser.IsOption);
 }