void InputTestNodeAI()
    {
        attackMap = new Node_DataMap ();
        attackMap.topNode = this;
        attackMap.InitializeNode ();

        distanceFilter = new Node_DistanceFilter ();
        distanceFilter._inputVar = blackboard.subject;
        distanceFilter._inputList = attackMap.dataMap;
        distanceFilter.inputThreshold = 0.5f;

        bestVal = new Node_BestValue ();
        bestVal.topQuantity = 1;
        bestVal._inputList = distanceFilter._outputList;

        lowerNodes.Add (distanceFilter);
        lowerNodes.Add (bestVal);
    }
    void SettingTargetTestNodeAI()
    {
        attackMap = new Node_DataMap ();
        attackMap.topNode = this;
        attackMap.InitializeNode ();

        outerElNode = new Node_OuterElementSelector ();
        outerElNode._inputList = attackMap.dataMap;
        outerElNode.topNode = this;
        outerElNode.inputThreshold = 0.5f;
        outerElNode.outputThreshold = 1.0f;

        distanceFilter = new Node_DistanceFilter ();
        distanceFilter._inputVar = blackboard.subject;
        distanceFilter._inputList = outerElNode._outputList;
        distanceFilter.inputThreshold = 0.5f;
        distanceFilter.outputThreshold = 0.5f;

        bestVal = new Node_BestValue ();
        bestVal.topQuantity = 1;
        bestVal._inputList = distanceFilter._outputList;

        addTargetNode = new Node_AddTarget ();
        addTargetNode.inputIds = bestVal._outputList;
        addTargetNode.controlledElement = blackboard.subject;

        lowerNodes.Add (outerElNode);
        lowerNodes.Add (distanceFilter);
        lowerNodes.Add (bestVal);
        lowerNodes.Add (addTargetNode);

        aiBlock.coreNodes = lowerNodes;
        aiBlock.dataNodes.Add (attackMap);
    }
    void TestNodeAI()
    {
        Node_AND andNode = new Node_AND ();
        andNode.inputThreshold = 1.0f;

        Node_OuterElementSelector nmbNode = new Node_OuterElementSelector ();
        nmbNode.inputThreshold = 0.5f;

        Node_DistanceFilter distNode = new Node_DistanceFilter ();
        distNode.inputThreshold = 0.5f;

        Node_Action movementNode = new Node_Action ();
        movementNode.inputThreshold = 1.0f;
        movementNode.actionNode = ActionNode.Attack;
        movementNode.functionType = FunctionType.Movement;

        lowerNodes.Add (andNode);
        //andNode.upperNode = this;
        andNode.lowerNodes.Add (nmbNode);
        nmbNode.upperNode = andNode;
        //		andNode.lowerNodes.Add (distNode);
        //		distNode.upperNode = andNode;
        andNode.lowerNodes.Add (movementNode);
        movementNode.upperNode = andNode;
    }
    void NestedListInputTestNodeAI()
    {
        attackMap = new Node_DataMap ();
        attackMap.topNode = this;
        attackMap.InitializeNode ();

        distanceFilter = new Node_DistanceFilter ();
        distanceFilter._inputVar = blackboard.subject;
        distanceFilter._inputList = outerElNode._outputList;
        distanceFilter.inputThreshold = 0.5f;
        distanceFilter.outputThreshold = 0.5f;
        distanceFilter.InitializeNode ();

        weightBlend = new Node_WeightBlend ();
        weightBlend.InitializeNode ();
        //		weightBlend._inputLists.Add (attackMap.dataMap);
        //		weightBlend._inputLists.Add (distanceFilter._outputList);

        //		TreeConstructor.inst.PassArgument (attackMap, weightBlend, VarType.IdWeightList, VarType.IdWeightNestedList, 0, 0);
        //		TreeConstructor.inst.PassArgument (distanceFilter, weightBlend, VarType.IdWeightList, VarType.IdWeightNestedList, 0, 1);

        VarPass mapCon = attackMap.GetConnection (VarType.IdWeightList, DataDirection.OutcomeData, 0);
        VarPass distCon = distanceFilter.GetConnection (VarType.IdWeightList, DataDirection.OutcomeData, 0);
        VarPass blendCon1 = weightBlend.GetConnection (VarType.IdWeightNestedList, DataDirection.IncomeData, 0);
        VarPass blendCon2 = weightBlend.GetConnection (VarType.IdWeightNestedList, DataDirection.IncomeData, 1);

        if(mapCon == null) Debug.Log("1");
        if(distCon == null) Debug.Log("2");
        if(blendCon1 == null) Debug.Log("3");
        if(blendCon2 == null) Debug.Log("4");

        TreeConstructor.inst.BindConnections (mapCon, blendCon1, mapCon.varType, blendCon1.varType, mapCon.num, blendCon1.num);
        TreeConstructor.inst.BindConnections (distCon, blendCon2, distCon.varType, blendCon2.varType, distCon.num, blendCon2.num);

        lowerNodes.Add (distanceFilter);
        lowerNodes.Add (weightBlend);

        aiBlock.coreNodes = lowerNodes;
        aiBlock.dataNodes.Add (attackMap);
    }