本文整理汇总了C#中Face.TwoChoices方法的典型用法代码示例。如果您正苦于以下问题:C# Face.TwoChoices方法的具体用法?C# Face.TwoChoices怎么用?C# Face.TwoChoices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Face
的用法示例。
在下文中一共展示了Face.TwoChoices方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunConsciousRoutine
protected override RoutineResult RunConsciousRoutine()
{
using (var memory = new Memory())
{
var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
Interaction i = face.TwoChoices(memory, "Cake or Pie?", "Cake", "Pie");
face.Talk(memory, "AHHHHH!", "A zombie!");
if (string.IsNullOrEmpty(i.resultText))
{
face.Talk(memory, "You were eaten");
}
else
{
face.Talk(memory, "Let's get the", "grenades");
face.Talk(memory, string.Format("{0} grenades", i.resultText));
}
return MakeRoutineResult(memory, i);
}
}
示例2: 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);
}
}
}