Exemple #1
0
        protected override IBehaviorTreeNode createBehaviorTree()
        {
            BehaviorTreeBuilder builder = new BehaviorTreeBuilder();

            return(AIExtensions.WithFightingAI(
                       builder
                       .Sequence()

                       .End()
                       .Build(),
                       Entity
                       ));
        }
Exemple #2
0
        protected override IBehaviorTreeNode createBehaviorTree()
        {
            BehaviorTreeBuilder builder = new BehaviorTreeBuilder();

            return(AIExtensions.WithFightingAI(
                       builder
                       .Sequence()
                       .LongRunningResultCached(() => new WaitTask(Entity, TimeSpan.FromMilliseconds(200)))
                       .LongRunningResultCached(() => new FollowTask(Entity, targetID, tillDistance, teleportDistance))
                       .End()
                       .Build(),
                       Entity
                       ));
        }
Exemple #3
0
        protected override IBehaviorTreeNode createBehaviorTree()
        {
            BehaviorTreeBuilder builder = new BehaviorTreeBuilder();

            return(AIExtensions.WithFightingAI(
                       builder
                       .Sequence()
                       .LongRunningResultCached(() => new WaitTask(Entity, TimeSpan.FromMilliseconds(1000)))
                       .LongRunningResultCached(() => new WanderTask(Entity, BlockStartPosition, BlockRadius))
                       .End()
                       .Build(),
                       Entity
                       ));
        }
Exemple #4
0
        protected override IBehaviorTreeNode createBehaviorTree()
        {
            BehaviorTreeBuilder builder = new BehaviorTreeBuilder();

            return(AIExtensions.WithFightingAI(
                       builder
                       .Sequence()
                       .LongRunningResultCached(() => new GoToTask(Entity, BlockGuardPosition))
                       .SingleStep((GameTime gameTime) => {
                Entity.Direction = LookDirection;

                return BehaviourTreeStatus.Success;
            })
                       .End()
                       .Build(),
                       Entity
                       ));
        }