Esempio n. 1
0
    public Sequence_MoveToDefense(HiveOfSurvivors hivemind)
    {
        select = new BT_Selector();
        select.AddTask(new Task_WaitOnCurrEnemies());

        runThru = new BT_Sequence();
        runThru.AddTask(new Task_CallDefenseUpdate(hivemind));
        runThru.AddTask(new Task_MoveToDefensePoint());

        select.AddTask(runThru);

        children.Add(select);
        //children.Add(runThru);
        //children.Add(new Task_CallDefenseUpdate(hivemind));
        //children.Add(new Task_MoveToDefensePoint());
    }
Esempio n. 2
0
    void Start()
    {
        survivor   = GetComponent <Survivor>();
        blackboard = new Blackboard();
        hiveRef    = GameObject.FindObjectOfType <HiveOfSurvivors>();

        btBrain   = new BT_Sequence();
        mvmtBrain = new BT_Sequence();
        mvmtTree  = new BT_Sequence();

        this.CreateAStarBT();
        this.CreateDefaultMvmtTree();
        this.CreateMultiGunBT();
        this.SetMvmtTree(MOVEMENT_TREE.DEFAULT);

        mvmtBrain.AddTask(mvmtTree);

        blackboard.startNode = start;
        blackboard.goalNode  = end;

        mvmtTracker = Moving.NOT_MOVING_ON_ASTAR;
    }
Esempio n. 3
0
 public Task_CallDefenseUpdate(HiveOfSurvivors hvm)
 {
     hivemind = hvm;
 }