예제 #1
0
 public DialogueNode(Serialization.DialogueNodeSerializer nodeSerializer,
                     Action <NodeConnectionPoint> onClickedPoint,
                     Action <DialogueNode> _onClickedRemoveNode,
                     Action <DialogueNode> _onActorIDChanged)
     : this(nodeSerializer.nodeID, new Vector2(nodeSerializer.posX, nodeSerializer.posY), nodeSerializer.width, nodeSerializer.height,
            onClickedPoint, _onClickedRemoveNode, _onActorIDChanged)
 {
     actorID = nodeSerializer.actorID;
     text    = nodeSerializer.text;
 }
예제 #2
0
        public DialogueDataSerializer(DialogueData dialogueData)
        {
            id    = dialogueData.id;
            name  = dialogueData.name;
            nodes = new DialogueNodeSerializer[dialogueData.nodes.Count];
            for (int i = 0; i < dialogueData.nodes.Count; i++)
            {
                nodes[i] = new DialogueNodeSerializer(dialogueData.nodes[i]);
            }

            connections = new NodeConnectionSerializer[dialogueData.connections.Count];
            for (int i = 0; i < dialogueData.connections.Count; i++)
            {
                connections[i] = new NodeConnectionSerializer(dialogueData.connections[i]);
            }
        }