예제 #1
0
    private void BuildTree()
    {
        root = new Selector();
        Sequencer  seq1  = new Sequencer();
        Randomizer rand1 = new Randomizer();

        root.AddChild(rand1);
        root.AddChild(seq1);

        Condition con1 = new Condition(nearDogs);
        BAction   pact = new BAction(Play);
        BAction   wact = new BAction(Wander);
        BAction   ract = new BAction(Run);
        BAction   sact = new BAction(Sleep);

        seq1.AddChild(con1);
        seq1.AddChild(pact);

        rand1.AddChild(wact);
        rand1.AddChild(ract);
        // rand1.AddChild(sact);


        root.AddChild(new BAction(Wander));
    }