Ejemplo n.º 1
0
        public BranchNode(NpcChatProject project)
        {
            m_project = project;
            m_branch  = null;

            ParentPin = new BranchInput(m_project, this);
            ChildPin  = new BranchOutput(this);
            Inputs.Add(ParentPin);
            Outputs.Add(ChildPin);
            CanBeRemovedByUser = false;

            Name = "Dialog Branch";
        }
Ejemplo n.º 2
0
        private ConnectionValidationResult ValidatePendingConnection(PendingConnectionViewModel arg)
        {
            DialogTree   tree         = m_project[(DialogTreeIdentifier)Branch];
            BranchOutput branchOutput = arg.Output as BranchOutput;

            if (tree == null || branchOutput == null || branchOutput.Branch == null ||
                tree.CheckForCircularDependency(branchOutput.Branch, Branch))
            {
                return(new ConnectionValidationResult(false, null));
            }

            return(new ConnectionValidationResult(true, null));
        }