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


C# Face.Fade方法代码示例

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


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

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

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

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


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