Exemple #1
0
        public static string Create(CharacterSheet character, TemplateSentenceGenerator outline)
        {
            HandlebarsHelpers.InitializeHelpers();
            var template = outline.Templates.ChooseOne();
            var context  = new CharacterContext(character); {
                context.Add("description", outline.CreateDescription());
                context.Add("feature", outline.Name);
                context.Add("descriptors", outline.Descriptors);
            };
            var sentence = template.WritePhrase(context);

            return(sentence.Capitalize());
        }
Exemple #2
0
 public PhraseTemplate(string template)
 {
     HandlebarsHelpers.InitializeHelpers();
     this.Template    = template;
     compiledTemplate = Handlebars.Compile(this.Template);
 }