public void Load(Dictionary<string, List<DialogueNodeLoader>> importedConversations)
{
try
{
foreach (string key in importedConversations.Keys)
{
ArrayList tempArrayList = new ArrayList();
// Build the list of DialogueNodes
foreach (Object item in importedConversations[key])
{
DialogueNodeLoader loader = (DialogueNodeLoader)item;
tempArrayList.Add(new DialogueNode(loader.NextState, loader.Text));
}
// Add the list of nodes to the conversations.
this.conversations.Add(key, tempArrayList);
this.npcStates.Add(key, null);
this.npcStateBubbles.Add(key, null);
}
}
catch (Exception except)
{
Console.Error.WriteLine("Bad things happened: " + except.Message);
}
}