// Start is called before the first frame update
        private void Start()
        {
            //Get BlackBoard from Transform
            blackBoard = GetComponent <BlackBoard>();

            node = new Sequence(

                new ConditionNode(blackBoard, new Func <bool>(() => !CheckBossHealth(50)), new Selector(
                                      new ConditionNode(blackBoard, new Func <bool>(() => !CheckPlayerDistance(12)), new Selector(
                                                            new MultiShot(blackBoard),
                                                            new SprayShot(blackBoard))),
                                      new ConditionNode(blackBoard, new Func <bool>(() => CheckPlayerDistance(12)), new Sequence(
                                                            new DashNode(blackBoard),
                                                            new BulletBurst(blackBoard))))),
                new ConditionNode(blackBoard, new Func <bool>(() => CheckBossHealth(50)), new Selector(
                                      new ConditionNode(blackBoard, new Func <bool>(() => !CheckPlayerDistance(12)), new Selector(
                                                            new SprayShot(blackBoard),
                                                            new SpawnMinions(blackBoard))),
                                      new ConditionNode(blackBoard, new Func <bool>(() => CheckPlayerDistance(12)), new Sequence(
                                                            new DashNode(blackBoard),
                                                            new DashNode(blackBoard),
                                                            new DashNode(blackBoard),
                                                            new BulletBurst(blackBoard))))));
        }
 public BulletBurst(BlackBoard board)
 {
     blackBoard = board;
 }
Beispiel #3
0
 public ConditionNode(BlackBoard bb, Func <bool> _condition, params Node[] _inputNodes)
 {
     this.blackBoard = bb;
     this.condition  = _condition;
     this.inputNodes = _inputNodes;
 }
Beispiel #4
0
 public SprayShot(BlackBoard board)
 {
     blackBoard = board;
 }
Beispiel #5
0
 protected override void Start()
 {
     base.Start();
     blackBoard = GetComponent <BlackBoard>();
     StartCoroutine(Spawn());
 }
 public SpawnMinions(BlackBoard board)
 {
     blackBoard = board;
 }
 public MultiShot(BlackBoard board)
 {
     blackBoard = board;
 }
Beispiel #8
0
 public DashNode(BlackBoard board)
 {
     blackBoard = board;
 }