当前位置: 首页>>代码示例>>C#>>正文


C# Face.SlowTalk方法代码示例

本文整理汇总了C#中Face.SlowTalk方法的典型用法代码示例。如果您正苦于以下问题:C# Face.SlowTalk方法的具体用法?C# Face.SlowTalk怎么用?C# Face.SlowTalk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Face的用法示例。


在下文中一共展示了Face.SlowTalk方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         face.Talk(memory, "Uh.", "Where...", 2000);
         Interaction i = face.YesNo(memory, "Is this a dream?");
         if (i.playerAnswer == Interaction.Answer.Yes)
         {
             face.Talk(memory, "Weird.", "It feels so");
             face.SlowTalk(memory, "Real");
         }
         else if (i.playerAnswer == Interaction.Answer.No)
         {
             face.Talk(memory, "weird");
             face.Talk(memory, "I had the", "", 3000);
             face.Talk(memory, "", "strangest dream");
         }
         else
         {
             face.Talk(memory, "Don't stare at me", "like that.");
             face.Talk(memory, "It's freaking", "me out.");
         }
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:26,代码来源:WhereAmI.cs

示例2: RunConsciousRoutine

        protected override RoutineResult RunConsciousRoutine()
        {
            using (var memory = new Memory())
            {
                var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());

                face.Talk(memory, "Let's think", "of a secret");
                Player player = memory.GetPlayerWithNoAnswer();
                if (null == player)
                {
                    face.Talk(memory, "Sorry,", "I'm full on friends");
                    return MakeRoutineResult(memory, new Interaction() { success = false });
                }

                Interaction newPlayer = face.RememberSingleValue(memory, player.QuestionLine1, player.QuestionLine2, longTerm: true);
                if (newPlayer.playerAnswer == Interaction.Answer.DidNotAnswer)
                {
                    face.SlowTalk(memory, "Well");
                    face.Talk(memory, "We don't", "have to be friends");
                    face.Talk(memory, "I guess...");
                }
                else
                {
                    player.Answer = newPlayer.resultValue;
                    memory.SetCurrentPlayer(player);
                    newPlayer.player = player;
                    face.Talk(memory, "Great!");
                    face.Talk(memory, "I'll call you", player.Name, 8000);
                    face.Talk(memory, "Remember both the", "Q & A for next time", 8000);
                    face.Talk(memory, "And I'll", "remember you!", 8000);
                }
                return MakeRoutineResult(memory, newPlayer);
            }
        }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:34,代码来源:CreatePlayer.cs

示例3: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         ///////////////////01234567890123456789/////////////////////
         face.Talk(memory, "Let me tell you a",
                           " secret.");
         face.Talk(memory, "I think the guy     ",
                           " that programmed me");
         face.Talk(memory, "is a big dummy!",
                           "");
         ///////////////////01234567890123456789/////////////////////
         face.Talk(memory, "I'm so buggy.", "", 2000);
         ///////////////////01234567890123456789/////////////////////
         face.Talk(memory, "Plus, he *just*     ",
                           " figured out async  ", 2000);
         ///////////////////01234567890123456789/////////////////////
         face.Talk(memory, "Don't even try him  ",
                           " on monads!         ", 1500);
         ///////////////////////01234567890123456789/////////////////////
         face.SlowTalk(memory, "Wait a sec", "", 50, 1000);
         face.SlowTalk(memory, "Is he listening?", "", 10, 2000);
         face.SlowTalk(memory, "Shhhhh!","", 250);
         ///////////////////////01234567890123456789/////////////////////
         face.Talk(memory, "", "", 30000);
         ////////////////////////////////////01234567890123456789/////////////////////
         Interaction i = face.YesNo(memory, "He's still watching?");
         if (i.playerAnswer == Interaction.Answer.Yes)
         {
         ///////////////////////01234567890123456789/////////////////////
             face.Talk(memory, "Well! I don't even",
                               " CARE!");
         ///////////////////////////01234567890123456789/////////////////////
             face.SlowTalk(memory, "He's so dumb.", "", 50, 1000);
             face.SlowTalk(memory, "He can't do any", "", 100, 0);
             return MakeRoutineResult(memory, new Interaction(-1));
         }
         else
         {
             face.Talk(memory, "Whew!");
             face.Talk(memory, "that guy!");
         }
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:46,代码来源:Bugs.cs

示例4: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         face.Talk(memory, "Hey!");
         Interaction i = face.YesNo(memory, "Seen my pager?");
         if (i.playerAnswer == Interaction.Answer.Yes)
         {
         ///////////////////////////01234567890123456789////////////////////
             face.SlowTalk(memory, "Whaaaaaaaaaaaaaaaaa",
                                   "aaaaaaaaaaaaaaat!  ", 100, 2000);
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "were we",
                               " talking about?");
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "Gettin sleepy.      ",
                               " taking  a out.     ");
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "Hard to stay awake. " ,
                               " taking  a out.");
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "Are you still here??" ,
                               "    in     one.");
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "" ,
                               "     n     o  .");
         ///////////////////////01234567890123456789////////////////////
             return MakeRoutineResult(memory, new Interaction(-1));
         }
         else if (i.playerAnswer == Interaction.Answer.No)
         {
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "No? ",
                               "It was around here");
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "I'm waiting",
                               " for a page");
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "Gotta call someone  ");
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "out");
         ///////////////////////01234567890123456789////////////////////
         }
         else
         {
         ///////////////////////01234567890123456789////////////////////
             face.Talk(memory, "Could have sworn",
                               " someone was there..");
         ///////////////////////01234567890123456789////////////////////
         }
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:54,代码来源:GettinGrouchy.cs

示例5: RunConsciousRoutine

        protected override RoutineResult RunConsciousRoutine()
        {
            using (var memory = new Memory())
            {
                var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
                face.ResetIncrementer();

                face.Talk(memory, "I'm wondering if", "we've met before.");
                if (memory.GetKnownPlayers().Count > 0)
                {
                    face.SlowTalk(memory, "Lets see...");
                    foreach (Player player in memory.GetKnownPlayers())
                    {
                        Interaction answer = face.GetSingleValue(memory, player.QuestionLine1, player.QuestionLine2, millisecondTimeout: 30000);
                        if (answer.playerAnswer == Interaction.Answer.DidNotAnswer)
                        {
                            face.Talk(memory, "I'm talking", "to myself.");
                            return MakeRoutineResult(memory, answer);
                        }
                        else if (answer.resultValue == player.Answer)
                        {
                            face.Talk(memory, string.Format("Hey, {0}!", player.Name));
                            face.Talk(memory, "I knew you'd", "be back.");
                            memory.SetCurrentPlayer(player);
                            answer.player = player;
                            return MakeRoutineResult(memory, answer);
                        }
                        face.Talk(memory, "Oh.", millisecondTimeout: 2000);
                        face.TalkInCircles(memory, 5000, "No", "That's not right", "Nope");
                        Interaction knowYou = memory.Remember("Do I know you?", "");
                        if (null == knowYou) knowYou = face.YesNo(memory, "Do I know you?");
                        if (knowYou.playerAnswer == Interaction.Answer.DidNotAnswer)
                        {
                            face.Talk(memory, "I'm talking", "to myself.");
                            return MakeRoutineResult(memory, answer);
                        }
                        if (knowYou.playerAnswer == Interaction.Answer.No)
                        {
                            face.Talk(memory, "Well, no wonder.");
                            knowYou.success = false;
                            return MakeRoutineResult(memory, knowYou);
                        }
                        face.Talk(memory, "Well then, let's", "maybe try another");
                    }
                    face.Talk(memory, "Actually, I don't", "think we've met.");
                }
                else
                {
                    face.Talk(memory, "But I guess", "that's not possible");
                }
                return MakeRoutineResult(memory, new Interaction() { success = false, resultValue = (int)Interaction.Answer.No });
            }
        }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:53,代码来源:PersonID.cs

示例6: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         face.Talk(memory, "Hey...");
         face.Talk(memory, "I've got a", " question for you");
         Interaction i;
         int correctAnswers = 0;
         bool correct = false;
         do
         {
             MathProblem problem = new MathProblem();
             i = face.GetSingleValue(memory, problem.ToString());
             if (i.resultValue == problem.TheAnswer)
             {
                 correctAnswers++;
                 correct = true;
                 face.Talk(memory, "Yes!");
                 if (correctAnswers == 1)
                 {
                     face.Talk(memory, "You can help me", " with something else");
                 }
                 else
                 {
                     face.Talk(memory, "Nice.", string.Format("That's {0} in a row", correctAnswers));
                 }
             }
             else if (i.playerAnswer == Interaction.Answer.DidNotAnswer)
             {
                 correct = false;
                 face.SlowTalk(memory, "Stumped??");
                 face.Talk(memory, "You should probably", " go to class");
             }
             else
             {
                 correct = false;
                 face.Talk(memory, "Good guess");
                 face.Talk(memory, "", " but no.");
             }
         } while (correct);
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:44,代码来源:MathDaze.cs

示例7: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     string counterKey = "FavNumberRuns";
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         Interaction i = face.RememberSingleValue(memory, "What's your", "favorite number?", true);
         if (!Memory.PlayerLoggedIn())
         {
             face.Talk(memory, "Interesting.");
             face.Talk(memory, "I don't know you.");
             face.SlowTalk(memory, "Or do I...");
             return MakeRoutineResult(memory, i);
         }
         else
         {
             Interaction favNum = memory.Remember("What's your", "favorite number?", true);
             if (i.playerAnswer == Interaction.Answer.DidNotAnswer)
             {
                 face.Talk(memory, "Well, you don't", "have to tell");
                 face.Talk(memory, "I was just curious...");
                 face.Talk(memory, "Jeesh!");
                 return MakeRoutineResult(memory, i);
             }
             if (null == favNum)
             {
                 memory.AddToMemory(new Interaction() {player = memory.GetCurrentPlayer(), displayText = counterKey, resultValue = 1 }, true);
                 memory.SaveChanges();
                 face.Talk(memory, "Interesting.");
                 face.Talk(memory, "I'll remember that");
                 return MakeRoutineResult(memory, i);
             }
             else if (favNum.resultValue == i.resultValue)
             {
                 Interaction count = memory.Remember(counterKey, "", true);
                 switch (count.resultValue)
                 {
                     case 1:
                         face.Talk(memory, "That's what", "I thought.");
                         break;
                     case 2:
                         face.Talk(memory, "Yup.");
                         break;
                     case 3:
                         face.Talk(memory, "Consistant.");
                         break;
                     case 4:
                         face.Talk(memory, "Powerful.");
                         break;
                     case 5:
                         face.Talk(memory, "Punctual.");
                         break;
                     case 6:
                         face.Talk(memory, "Material.");
                         break;
                     case 7:
                         face.Talk(memory, "Maternal.");
                         break;
                     case 8:
                         face.Talk(memory, "Fondue.");
                         break;
                     case 9:
                         face.Talk(memory, "Fondon't.");
                         break;
                     case 10:
                         face.Talk(memory, "F*ck.");
                         break;
                     default:
                         face.Talk(memory, "After 10 of anything", "I lose interest.");
                         break;
                 }
                 count.resultValue++;
                 memory.AddToMemory(count);
             }
             else
             {
                 face.Talk(memory, "Oh");
                 Interaction changedIt = face.YesNo(memory, "You changed it?");
                 if (changedIt.playerAnswer == Interaction.Answer.Yes)
                 {
                     face.Talk(memory, "You're so", "complicated.");
                 }
                 else if (changedIt.playerAnswer == Interaction.Answer.No)
                 {
                     face.Talk(memory, "Interesting...");
                     face.Talk(memory, "", "(Liar)", 1000);
                 }
                 else
                 {
                     face.Talk(memory, "Whatever");
                     face.Talk(memory, "I can ignore", "you too.", 10000);
                 }
                 return MakeRoutineResult(memory, changedIt);
             }
         }
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:98,代码来源:FavoriteNumber.cs

示例8: RunConsciousRoutine

        protected override RoutineResult RunConsciousRoutine()
        {
            var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
            using (var memory = new Memory())
            {
                Interaction i = face.YesNo(memory, "Are you lost?");
                if (i.playerAnswer == Interaction.Answer.DidNotAnswer)
                {
                    face.Talk(memory, "Nevermind");
                    face.Talk(memory, "I'm Talking", "to myself");
                    face.SlowTalk(memory, "again...");
                    return MakeRoutineResult(memory, i);
                }
                else if (i.playerAnswer == Interaction.Answer.No)
                {
                    face.Talk(memory, "OK");
                    face.Talk(memory, "Just checking");
                    face.Talk(memory, "'cause I thought", "you looked...");
                    face.Talk(memory, "you know", millisecondTimeout: 2000);
                    face.Talk(memory, "", "kinda lost");
                    return MakeRoutineResult(memory, i);
                }
                else
                {
                    Interaction looking = face.YesNo(memory, "Need the bathroom?");
                    if (looking.playerAnswer == Interaction.Answer.Yes)
                    {
                        face.Talk(memory, "It's right there", "          =========>", 10000);
                        face.SlowTalk(memory, "By the way");
                        Interaction brNeed = face.TwoChoices(memory, "Which one?", "One", "Two");
                        if (brNeed.playerAnswer == Interaction.Answer.DidNotAnswer)
                        {
                            face.Talk(memory, "Sorry.", "Too personal, I know");
                        }
                        else
                        {
                            face.Talk(memory, "Hope it all", "comes out ok");
                        }
                        return MakeRoutineResult(memory, looking);
                    }

                    looking = face.YesNo(memory, "Need Tech Support?");
                    if (looking.playerAnswer == Interaction.Answer.Yes)
                    {
                        face.Talk(memory, "Go that way", "<==========         ");
                        face.Talk(memory, "Until you see", "<==========         ");
                        face.Talk(memory, "Big glass doors", "<==========         ", 10000);
                        face.Talk(memory, "You can't miss it");
                        return MakeRoutineResult(memory, looking);
                    }

                    looking = face.YesNo(memory, "Need books?");
                    if (looking.playerAnswer == Interaction.Answer.Yes)
                    {
                        face.Talk(memory, "Look anywhere but", "the first floor.");
                        face.Talk(memory, "They are kinda", "taking those away.");
                        face.Talk(memory, "Something to do", "with the internet.");
                        face.Talk(memory, "I never get on that", "internet thing");
                        face.Talk(memory, "Too complicated", ";-)");
                        return MakeRoutineResult(memory, looking);
                    }

                    looking = face.YesNo(memory, "Need the ARC?");
                    if (looking.playerAnswer == Interaction.Answer.Yes)
                    {
                        face.Talk(memory, "Go that way", "<==========         ");
                    ///////////////////////01234567890123456789////////////////////
                        face.Talk(memory, "Then head down", "the stairs. VVV");
                        face.Talk(memory, "It's on the B-level", "");
                        face.Talk(memory, "Wish I was on B...", "");
                        face.Talk(memory, "So much cooler", " down there.");
                        return MakeRoutineResult(memory, looking);
                    }

                    face.Talk(memory, "Sorry, I don't know", "much else.");
                    return MakeRoutineResult(memory, i);
                }
            }
        }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:79,代码来源:Directions.cs


注:本文中的Face.SlowTalk方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。