Пример #1
0
 protected override IBTreeBuilder ExtendLogic(IBTreeBuilder baseLogic)
 {
     return(BTree.Build()
            .Selector(b =>
                      baseLogic
                      .Sequence(b1 => b1
                                .Leaf(new CheckStrategyLeaf(this, Strategy.Aggressive))
                                .Leaf(new LockTargetLeaf(this, false))
                                .Leaf(new GoToTargetLeaf(this))
                                .Leaf(new KillTargetLeaf(this)))
                      .Sequence(b2 => b2
                                .Leaf(new CheckStrategyLeaf(this, Strategy.Defencive))
                                .Selector(b21 => b21
                                          .Leaf(new CheckTargetInRangeLeaf(this))
                                          .Leaf(new LockTargetLeaf(this, true)))
                                .Leaf(new KillTargetLeaf(this)))));
 }
Пример #2
0
Файл: Unit.cs Проект: gormel/rts
 protected virtual IBTreeBuilder ExtendLogic(IBTreeBuilder baseLogic)
 {
     return(baseLogic);
 }