Exemplo n.º 1
0
        private void EvaluateConditionNode(ConditionNodeData node)
        {
            List <NodeLinkData> nextNodes = GetLinks(node.guid);

            BaseNodeData nextNode = GetTargetNode(node.conditionToTest.Value ? nextNodes[0] : nextNodes[1]);

            PlayNode(nextNode);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Generates a new ConditionNode with existing data.
        /// </summary>
        /// <param name="nodeData"></param>
        public ConditionNode(ConditionNodeData nodeData)
        {
            Guid            = nodeData.guid;
            type            = NodeType.Condition;
            ConditionToTest = nodeData.conditionToTest;

            styleSheets.Add(Resources.Load <StyleSheet>("Node"));

            GenerateOutputPorts();
            BuildNodeControls();
            UpdateNodeFields();
        }
 /// <summary>
 /// Creates a new Condition node with given values.
 /// </summary>
 /// <param name="nodeData">The values to initialize the node with.</param>
 /// <returns>A condition node with the initialized values.</returns>
 public ConditionNode CreateConditionNode(ConditionNodeData nodeData)
 {
     return(new ConditionNode(nodeData));
 }