/// <summary> /// Copies a Chat Mapper conversation. /// </summary> /// <param name='chatMapperConversation'> /// The Chat Mapper conversation. /// </param> public void Assign(ChatMapper.Conversation chatMapperConversation, bool putEndSequenceOnLastSplit = true) { if (chatMapperConversation != null) { Assign(chatMapperConversation.ID, chatMapperConversation.Fields); nodeColor = chatMapperConversation.NodeColor; foreach (var chatMapperEntry in chatMapperConversation.DialogEntries) { AddConversationDialogueEntry(chatMapperEntry); } SplitPipesIntoEntries(putEndSequenceOnLastSplit); // Set priority of links to the destination entry's priority: foreach (var entry in dialogueEntries) { foreach (var link in entry.outgoingLinks) { if (link.destinationConversationID != id) { continue; } var dest = GetDialogueEntry(link.destinationDialogueID); if (dest == null) { continue; } link.priority = dest.conditionPriority; } } } }
private static ChatMapper.Conversation ConversationToCmp(DialogueSystem.Conversation conversation, bool includeCanvasRect) { ChatMapper.Conversation cmpConversation = new ChatMapper.Conversation(); cmpConversation.ID = conversation.id; cmpConversation.NodeColor = string.IsNullOrEmpty(conversation.nodeColor) ? "Red" : conversation.nodeColor; cmpConversation.LockedMode = "Unlocked"; cmpConversation.Fields = FieldsToCmp(conversation.fields); AddRequiredConversationFields(cmpConversation.Fields); cmpConversation.DialogEntries = DialogEntriesToCmp(conversation.dialogueEntries, includeCanvasRect); return(cmpConversation); }
/// <summary> /// Copies a Chat Mapper conversation. /// </summary> /// <param name='chatMapperConversation'> /// The Chat Mapper conversation. /// </param> public void Assign(ChatMapper.Conversation chatMapperConversation, bool putEndSequenceOnLastSplit = true) { if (chatMapperConversation != null) { Assign(chatMapperConversation.ID, chatMapperConversation.Fields); nodeColor = chatMapperConversation.NodeColor; foreach (var chatMapperEntry in chatMapperConversation.DialogEntries) { AddConversationDialogueEntry(chatMapperEntry); } SplitPipesIntoEntries(putEndSequenceOnLastSplit); } }
/// <summary> /// Copies a Chat Mapper conversation. /// </summary> /// <param name='chatMapperConversation'> /// The Chat Mapper conversation. /// </param> public void Assign(ChatMapper.Conversation chatMapperConversation) { if (chatMapperConversation != null) { Assign(chatMapperConversation.ID, chatMapperConversation.Fields); nodeColor = chatMapperConversation.NodeColor; foreach (var chatMapperEntry in chatMapperConversation.DialogEntries) { AddConversationDialogueEntry(chatMapperEntry); } SplitPipesIntoEntries(); } }
/// <summary> /// Initializes a new Conversation copied from a Chat Mapper conversation. /// </summary> /// <param name='chatMapperConversation'> /// The Chat Mapper conversation. /// </param> public Conversation(ChatMapper.Conversation chatMapperConversation, bool putEndSequenceOnLastSplit = true) { Assign(chatMapperConversation, putEndSequenceOnLastSplit); }
private static ChatMapper.Conversation ConversationToCmp(DialogueSystem.Conversation conversation) { ChatMapper.Conversation cmpConversation = new ChatMapper.Conversation(); cmpConversation.ID = conversation.id; cmpConversation.NodeColor = string.IsNullOrEmpty(conversation.nodeColor) ? "Red" : conversation.nodeColor; cmpConversation.LockedMode = "Unlocked"; cmpConversation.Fields = FieldsToCmp(conversation.fields); AddRequiredConversationFields(cmpConversation.Fields); cmpConversation.DialogEntries = DialogEntriesToCmp(conversation.dialogueEntries); return cmpConversation; }
/// <summary> /// Initializes a new Conversation copied from a Chat Mapper conversation. /// </summary> /// <param name='chatMapperConversation'> /// The Chat Mapper conversation. /// </param> public Conversation(ChatMapper.Conversation chatMapperConversation) { Assign(chatMapperConversation); }