Beispiel #1
0
    public void addNode(uConversationNode node)
    {
        foreach (uConversationNode c in nodeList)
        {
            foreach (long uid in c.getAlternatives().Keys)
            {
                uConversationNode.Alternative a = null;
                c.getAlternatives().TryGetValue(uid, out a);
                if (a.getUID() == node.getUID())
                {
                    a.setTarget(node);
                }
            }

            foreach (long uid in node.getAlternatives().Keys)
            {
                uConversationNode.Alternative a = null;
                node.getAlternatives().TryGetValue(uid, out a);
                if (a.getUID() == c.getUID())
                {
                    a.setTarget(c);
                }
            }
        }

        nodeList.Add(node);
        nodes++;
    }
Beispiel #2
0
    public Alternative newAlternative(uConversationNode target)
    {
        Alternative alt = new Alternative(target.getUID());

        alt.setTarget(target);
        alternatives.Add(alt.getUID(), alt);
        return(alt);
    }