/// <summary>
 /// Create an instance of dialogue provider with assigned NPC and content loader
 /// </summary>
 /// <param name="npc">NPC for assign</param>
 /// <param name="contentLoader">Source of dialogues</param>
 public DialogueProvider(NPC npc, IContentLoader contentLoader, string sourcePrefix = "Dialogue/")
 {
     this.npc            = npc;
     this.contentLoader  = contentLoader;
     this.sourcePrefix   = sourcePrefix;
     this.dialogueCache  = new Dictionary <string, string>();
     this.keyLookupCache = new SortedDictionary <string, List <string> >();
     this.keygen         = new VariousKeyGenerator();
 }
Esempio n. 2
0
 /// <summary>
 /// Create an instance of dialogue provider with assigned NPC and content loader
 /// </summary>
 /// <param name="csm">Companion State Machine</param>
 /// <param name="contentLoader">Content asset loader</param>
 /// <param name="sourcePrefix">Asset source file prefix</param>
 internal DialogueProvider(CompanionStateMachine csm, IContentLoader contentLoader, string sourcePrefix = "Dialogue/")
 {
     this.csm            = csm;
     this.contentLoader  = contentLoader;
     this.sourcePrefix   = sourcePrefix;
     this.dialogueCache  = new Dictionary <string, string>();
     this.keyLookupCache = new SortedDictionary <string, List <string> >();
     this.keygen         = new VariousKeyGenerator();
 }