Example #1
0
 public void Set(ConversationPiece originalConversationPiece, ConversationPiece newConversationPiece)
 {
     if (originalConversationPiece.id != newConversationPiece.id)
     {
         foreach (var i in items)
         {
             var options = i.options;
             for (var j = 0; j < options.Count; j++)
             {
                 if (options[j].targetId == originalConversationPiece.id)
                 {
                     var c = options[j];
                     c.targetId = newConversationPiece.id;
                     options[j] = c;
                 }
             }
         }
     }
     for (var i = 0; i < items.Count; i++)
     {
         if (items[i].id == originalConversationPiece.id)
         {
             items[i] = newConversationPiece;
             break;
         }
     }
 }
Example #2
0
        internal static void Edit(ConversationScript conversationScript, ConversationPiece conversationPiece)
        {
            var w = ScriptableWizard.DisplayWizard <ConversationPieceDialog>("Edit Conversation Piece", "Update");

            w.targets = (from i in conversationScript.items select i.id).ToArray();
            w.originalConversationPiece = conversationPiece;
            w.conversationPiece         = conversationPiece;
            w.conversationScript        = conversationScript;
            w.isUpdate = true;
        }
Example #3
0
 public void Add(ConversationPiece conversationPiece)
 {
     items.Add(conversationPiece);
 }