public override void BuildBehaviourTree(StateMachine stateMachine)
        {
            machine = stateMachine;
            enemy   = machine as Enemy1;

            waitTimeEvaluateDeltaTime = new WaitForSeconds(evaluateDeltaTime);

            attack_22 = new Sequence(new List <Node>()
            {
                actionAttack_22,
                actionWaitAfterCloseAttack_22
            });
            attack_21 = new Sequence(new List <Node>()
            {
                chechRandom_21,
                actionAttack_21,
                actionWaitAfterCloseAttack_21
            });
            closeAttack_2 = new Selector(new List <Node>
            {
                attack_21,
                attack_22
            });
            dashAttack_1 = new Sequence(new List <Node>
            {
                checkIsDistance_1,
                checkIsThereObstacle_1,
                checkPathCornerCount_1,
                actionWaitBeforeDash_1,
                actionDash_1,
                actionPlayAnimation_1,
                actionWaitAfterDash_1
            });
            rootNode = new Selector(new List <Node>
            {
                dashAttack_1,
                closeAttack_2
            });

            checkIsDistance_1.StartLeaf(this);
            checkIsThereObstacle_1.StartLeaf(this);
            checkPathCornerCount_1.StartLeaf(this);
            actionWaitBeforeDash_1.StartLeaf(this);
            actionDash_1.StartLeaf(this);
            actionPlayAnimation_1.StartLeaf(this);
            actionWaitAfterDash_1.StartLeaf(this);

            chechRandom_21.StartLeaf(this);
            actionAttack_21.StartLeaf(this);
            actionWaitAfterCloseAttack_21.StartLeaf(this);

            actionAttack_22.StartLeaf(this);
            actionWaitAfterCloseAttack_22.StartLeaf(this);
        }
        public override void BuildBehaviourTree(StateMachine stateMachine)
        {
            machine = stateMachine;
            enemy   = machine as Enemy2;

            waitForApproach_3 = new Sequence(new List <Node>
            {
                checkIsDistance1_3,
                checkIsDistance2_3,
                actionMirrorTargetMoves_3
            });
            goToAttackPosition_2 = new Sequence(new List <Node>
            {
                checkIsDistance_2,
                actionGoToAttackPosition_2
            });
            closeAttack_12 = new Sequence(new List <Node>
            {
                checkIsDistance_12,
                actionCloseAttack_12,
                actionPlayIdleAnimation_12,
                actionWaitAfterAttack_12
            });
            dashAttack_11 = new Sequence(new List <Node>
            {
                checkIsDistance1_11,
                checkIsDistance2_11,
                actionDashAttack_11,
                actionPlayAttackEnd_11,
                actionPlayIdleAnimation_11,
                actionWaitAfterAttack_11
            });
            approachAttack_1 = new Selector(new List <Node>
            {
                dashAttack_11,
                closeAttack_12
            });
            rootNode = new Selector(new List <Node>
            {
                approachAttack_1,
                goToAttackPosition_2,
                waitForApproach_3
            });

            checkIsDistance1_11.StartLeaf(this);
            checkIsDistance2_11.StartLeaf(this);
            actionDashAttack_11.StartLeaf(this);
            actionPlayAttackEnd_11.StartLeaf(this);
            actionPlayIdleAnimation_11.StartLeaf(this);
            actionWaitAfterAttack_11.StartLeaf(this);

            checkIsDistance_12.StartLeaf(this);
            actionCloseAttack_12.StartLeaf(this);
            actionPlayIdleAnimation_12.StartLeaf(this);
            actionWaitAfterAttack_12.StartLeaf(this);

            checkIsDistance_2.StartLeaf(this);
            actionGoToAttackPosition_2.StartLeaf(this);

            checkIsDistance1_3.StartLeaf(this);
            checkIsDistance2_3.StartLeaf(this);
            actionMirrorTargetMoves_3.StartLeaf(this);
        }