示例#1
0
    public ConversationSave getSaveData()
    {
        ConversationSave.Builder builder = ConversationSave.CreateBuilder();
        builder.SetName(name);

        foreach (uConversationNode node in nodeList)
        {
            builder.AddNodes(node.getConversationNodeSave());
        }

        return(builder.Build());
    }
示例#2
0
 public void setFromSave(ConversationSave saveData)
 {
     //O(n^2) because its quick to code and we don't have a lot of nodes to deal with
     foreach (ConversationNodeSave s in saveData.NodesList)
     {
         foreach (uConversationNode n in nodeList)
         {
             if (n.getUID() == s.Uid)
             {
                 n.setConversationNodeFromData(s);
             }
         }
     }
 }