本文整理汇总了C#中Face.Talk方法的典型用法代码示例。如果您正苦于以下问题:C# Face.Talk方法的具体用法?C# Face.Talk怎么用?C# Face.Talk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Face
的用法示例。
在下文中一共展示了Face.Talk方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: 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);
}
}
示例3: 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 });
}
}
示例4: 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);
}
}
示例5: 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);
}
}
示例6: 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);
}
}
示例7: 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);
}
}
示例8: 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);
}
}
示例9: RunConsciousRoutine
protected override RoutineResult RunConsciousRoutine()
{
using (var memory = new Memory())
{
Topic[] topics = { new Topic() { name = "Ebola", positive=false},
new Topic() { name = "football game", positive=true},
new Topic() { name = "weather", positive=true},
};
Random rand = new Random();
int index = rand.Next(0, 3);
var face = new Face(RendererFactory.GetPreferredRenderer(), InputFactory.GetPreferredInput());
Interaction i = face.RememberSingleValue(memory, "How bout that", topics[index].name);
face.Talk(memory, "Uh huh.");
return MakeRoutineResult(memory, i);
}
}
示例10: 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);
}
}
示例11: 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);
}
}
示例12: 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);
}
}
示例13: 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);
}
}
示例14: 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);
}
}
示例15: 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);
}
}