Пример #1
0
        //plot point dialogue
        public List <DialogueObj> ChooseDialogPlot(DialogueParsing r, string currNode, string id, string t)
        {
            int countdown = -1;
            List <DialogueObj> responseList = new List <DialogueObj>();
            var best = new DialogueObj();
            int i    = int.Parse(id) - 1;

            for (; i < r.r.Dialogues.Count; i++)
            {
                var curr = r.r.Dialogues[i];
                if (curr.plot == currNode && id == curr.id && (curr.tone == t || curr.tone == "Default"))
                {
                    responseList.Add(curr);
                    countdown = 1;
                }
                if (countdown-- == 0)
                {
                    return(responseList);
                }
            }

            if (responseList.Count == 0)
            {
                responseList.Add(best);
            }
            return(responseList);
        }
Пример #2
0
        public List <DialogueObj> chooseJank(DialogueParsing r, string id, string t)
        {
            List <DialogueObj> responseList = new List <DialogueObj>();
            var best = new DialogueObj();

            for (int i = 0; i < r.r.Dialogues.Count; i++)
            {
                var curr = r.r.Dialogues[i];
                if (curr.id == id && (curr.tone == t || curr.tone == "Default"))
                {
                    responseList.Add(curr);
                    return(responseList);
                }
            }
            responseList.Add(best);
            return(responseList);
        }