Exemplo n.º 1
0
    private void Setup()
    {
        root = new Root();

        var seq = new Sequence(root);

        seq.AddAction(new Task(Task1));
        seq.AddAction(new Task(Task2));
        seq.AddAction(new Task(Task3));
        seq.Setup();

        var sel = new Selector(root);

        sel.AddAction(new Task(Task4));
        sel.AddAction(new Task(Task5));
        seq.Setup();

        root.AddNode(seq);
        root.AddNode(sel);
        root.Setup();
    }