Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 //printStuff(curr,currNode,id,t);
 private void printStuff(DialogueObj d, string c_node, string c_id, string c_tone)
 {
     Console.WriteLine("current dialogue object fields: " + d.id + " , " + d.plot);
     Console.WriteLine("current varibles to be matched: " + c_id + " , " + c_node + " , " + c_tone);
 }