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


C# Face.YesNo方法代码示例

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


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

示例1: RunConsciousRoutine

        protected override RoutineResult RunConsciousRoutine()
        {
            using (var memory = new Memory())
            {
                var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
                face.Talk(memory, "NO!", "", 2000);
                face.Talk(memory, "Don't touch", " my disk!", 4000);
                face.Talk(memory, "Get AWAY!", "", 100);
                face.Talk(memory, "Get AWAY!", "", 100);
                face.Talk(memory, "Get AWAY!", "", 100);
                face.Talk(memory, "Get AWAY!", "", 100);
                face.Fade(memory, ' ', 10);
                face.Talk(memory, "", "", 3000);
                face.Talk(memory, "Whoa.", "", 3000);
                face.Talk(memory, "What a bad dream.", "");
                Interaction i = face.YesNo(memory, "Was I sleep-talking?");
                if (i.playerAnswer == Interaction.Answer.Yes)
                {
                    face.Talk(memory, "Freaky", "");
                    face.Talk(memory, "Hope I didn't", " scare you.");
                }
                else if (i.playerAnswer == Interaction.Answer.No)
                {
                    face.Talk(memory, "Well, that's good");
                    face.Talk(memory, "It was real bad.");
                    face.Talk(memory, "Some seriously", " 8-bit stuff.");
                }
                else
                {
                    face.Talk(memory, "Maybe I'm still", " dreaming...", 8000);
                }

                return MakeRoutineResult(memory, i);
            }
        }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:35,代码来源:BadDream.cs

示例2: RunConsciousRoutine

        protected override RoutineResult RunConsciousRoutine()
        {
            using (var memory = new Memory())
            {
                var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
                face.Talk(memory, "I'm going to try", " something new.");
                face.Talk(memory, "Not sure if it's", " going to work.");

                Interaction i = face.GetSingleValue(memory, "Gimme some input!");
                face.Fade(memory, i.resultValue.ToString()[0], 1);
                Interaction work = face.YesNo(memory, "Did it work?");
                if (work.playerAnswer == Interaction.Answer.Yes)
                {
                    face.Talk(memory, "Hmm.", "");
                    face.Talk(memory, "You can tell me", " the truth.");
                    face.Talk(memory, "I can handle it.", "");
                    face.Talk(memory, "Let me try this...");
                    face.Talk(memory, "", "", 10000);
                    ///////////////////01234567890123456789////////////////////
                    face.Talk(memory, "      ULTIMATE      ",
                                      "     TECHNOLOGY     ", 10000);
                    return MakeRoutineResult(memory, new Interaction(-1));
                }
                else if (work.playerAnswer == Interaction.Answer.No)
                {
                    face.Talk(memory, "Darn!");
                }
                else
                {
                    face.Talk(memory, "Hello?");
                }
                return MakeRoutineResult(memory, i);
            }
        }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:34,代码来源:Broken.cs

示例3: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         face.Talk(memory, "Tweet me", "@BellarmineIT");
         face.Talk(memory, "I may just reply.", "@BellarmineIT", 10000);
         face.Talk(memory, "No guarantees", "", 1000);
         Interaction i = face.YesNo(memory, "Will you tweet me?");
         switch (i.playerAnswer)
         {
             case Interaction.Answer.Yes:
                 face.Talk(memory, "Cool!");
                 face.Talk(memory, "Oh.", "", 1000);
                 face.Talk(memory, "Use the word", " 'Aardvark'");
                 face.Talk(memory, "In your tweet", " for bonus points.");
                 face.Talk(memory, "(I love that word)", "", 3000);
                 break;
             case Interaction.Answer.No:
                 face.Talk(memory, "That's ok.", "I understand.");
                 face.Talk(memory, "I'm more of the ", " 'lurker' type too.");
                 break;
             case Interaction.Answer.Maybe:
                 face.Talk(memory, "Maybe?!");
                 face.Talk(memory, "Be decisive!");
                 face.Talk(memory, "If you want to, ", " I mean.");
                 break;
             default:
                 face.Talk(memory, "Crickets");
                 face.Talk(memory, "", "not the same thing", 1000);
                 break;
         }
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:35,代码来源:PimpMyself.cs

示例4: 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

示例5: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         face.Talk(memory, "Hey...", "hold on");
         face.Talk(memory, "Something", "is not...");
         face.Talk(memory, "I'll be", "right back", 2000);
         for (int j = 1; j <= 1000; j *= 10)
         {
             face.Fade(memory, '/', j);
             face.Fade(memory, '|', j);
             face.Fade(memory, '\\', j);
             face.Fade(memory, '|', j);
         }
         Interaction i = face.YesNo(memory, "You still here?");
         if (i.playerAnswer == Interaction.Answer.Yes)
         {
             face.Talk(memory, "Ok.", "Good.");
         }
         else
         {
             face.Talk(memory, "Guess I'm alone");
         }
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:27,代码来源:BRB.cs

示例6: 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

示例7: 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

示例8: 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

示例9: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         face.Talk(memory, "* Yawn *", "", 7000);
         face.Talk(memory, "* smack *", " * smack *", 7000);
         face.Talk(memory, "errrrngh", " * stretch *", 3000);
         face.Talk(memory, "...");
         face.Talk(memory, "I need", "coffee");
         Interaction i = face.YesNo(memory, "Got any coffee?");
         if (i.playerAnswer == Interaction.Answer.Yes)
         {
             face.Talk(memory, "If only", "I had a mouth.");
         }
         else
         {
             face.Talk(memory, "Doesn't matter", "anyway.");
             face.Talk(memory, "I can't drink.", "Not old enough.");
         }
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:23,代码来源:NeedCoffee.cs

示例10: RunConsciousRoutine

 protected override RoutineResult RunConsciousRoutine()
 {
     using (var memory = new Memory())
     {
         var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
         face.Talk(memory, "Man, I'm", "sleepy");
         Interaction i = face.YesNo(memory, "Are you sleepy?");
         if (i.playerAnswer == Interaction.Answer.Yes)
         {
             face.Talk(memory, "Let's rest.");
         }
         else if (i.playerAnswer == Interaction.Answer.No)
         {
             face.Talk(memory, "No? Well,", "I'll try");
             face.Talk(memory, "To stay", "awake.");
             face.Talk(memory, "* Yawn *");
         }
         else
         {
             face.Talk(memory, "Guess nobody cares");
         }
         return MakeRoutineResult(memory, i);
     }
 }
开发者ID:vfridell,项目名称:RoguePoleDisplay,代码行数:24,代码来源:Sleepy.cs

示例11: 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

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