本文整理汇总了C#中Grammar.AddTag方法的典型用法代码示例。如果您正苦于以下问题:C# Grammar.AddTag方法的具体用法?C# Grammar.AddTag怎么用?C# Grammar.AddTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grammar
的用法示例。
在下文中一共展示了Grammar.AddTag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
grammar = new Grammar();
grammar.AddTag("story", new string[] {
"#story_beginning# #story_problem# #story_climax# #story_ending#"
});
grammar.AddTag("story_beginning", new string[] {
"Once upon a time there was a valiant #animal#"
});
grammar.AddTag("story_problem", new string[] {
"that never #difficulty_verb#.",
"that one day heard some strange words: #strange_calling#"
});
grammar.AddTag("story_climax", new string[] {
"Suddenly, he decided to #resolution_verb#."
});
grammar.AddTag("story_ending", new string[] {
"Finally he could #result_verb# without worries."
});
grammar.AddTag("difficulty_verb", new string[] {"slept", "danced", "talked"});
grammar.AddTag("resolution_verb", new string[] {"run", "sing", "give up"});
grammar.AddTag("result_verb", new string[] {"sleep", "dance", "talk freely"});
grammar.AddTag("strange_calling", new string[] {"Hello #name#!", "Hello my #writer_object#!"});
grammar.AddTag("animal", new string[] {"dolphin", "dog", "cat", "lamb", "lion"});
grammar.AddTag("name", new string[] {"Mr. Gil", "Madame", "Masked Man"});
grammar.AddTag("writer_object", new string[] {"text", "book", "beloved code"});
InvokeRepeating("TestEvaluation", 1f, 2f);
}