コード例 #1
0
ファイル: OldSelector.cs プロジェクト: jwchau/SayAgain
        //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
ファイル: OldSelector.cs プロジェクト: jwchau/SayAgain
        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);
        }
コード例 #3
0
ファイル: OldSelector.cs プロジェクト: jwchau/SayAgain
 //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);
 }