예제 #1
0
        public bool EvaluateANDNode(ANDNode node, ADTreeContext context)
        {
            bool l = node.LeftChild.Accept(this, context);
            bool r = node.RightChild.Accept(this, context);

            return(l && r);
        }
 public ANDNode AND()
 {
     if (lexer.GetToken().Id == 19)
     {
         var result = new ANDNode(lexer.GetText());
         lexer.NextToken();
         return(result);
     }
     throw new ParserException("Got unxpected token from lexer");
 }
예제 #3
0
        public override void OnClick(Node source, Vector2 mousePosition)
        {
            ANDNode node = source as ANDNode;

            NodeEditorUtility.AddNewNode(graph.editorData, null, null, mousePositionOnCanvas, (MultiANDNode n) => {
                n.targets[0] = node.targetA;
                n.targets[1] = node.targetB;
                n.editorRect = node.editorRect;
                RefactorUtility.RetargetValueNode(node, n);
            });
            NodeEditorUtility.RemoveNode(graph.editorData, node);
            graph.Refresh();
        }
예제 #4
0
 public int EvaluateANDNode(ANDNode node, ADTreeContext context)
 {
     return(node.LeftChild.Accept(this, context) + node.RightChild.Accept(this, context) + node.Cost);
 }
예제 #5
0
 public ANDBuilder(string inputName)
 {
     Node = new ANDNode("AND", inputName);
 }